From eee25a4dc6a2f087c4cf8e0d0f3b5b8821ca829d Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 4 Nov 2025 22:04:15 -0500 Subject: [PATCH] ci: revert but keep delay --- .github/workflows/release-on-version.yml | 28 ++++++------------------ 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release-on-version.yml b/.github/workflows/release-on-version.yml index fe7f655..78a4464 100644 --- a/.github/workflows/release-on-version.yml +++ b/.github/workflows/release-on-version.yml @@ -24,39 +24,26 @@ jobs: needs: delay runs-on: ubuntu-latest concurrency: - # Cancel older runs for the same branch/ref so only the latest proceeds - group: release-${{ github.ref }} - cancel-in-progress: true + group: release-${{ github.ref }}-${{ github.sha }} + cancel-in-progress: false steps: - - name: Checkout correct ref + - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - # For workflow_run, use the triggering workflow's head_sha; else use the current SHA - ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }} - name: Ensure tags available run: | git fetch --tags --force --prune --quiet - - name: Show recent tags (debug) - run: git tag --list "v*" --sort=-v:refname | head -n 20 - - name: Read version from version.js id: ver shell: bash run: | set -euo pipefail - echo "version.js at commit: $(git rev-parse --short HEAD)" - sed -n '1,80p' public/js/version.js || true - - VER=$( - grep -Eo "APP_VERSION[^\\n]*['\"]v[0-9][^'\"]+['\"]" public/js/version.js \ - | sed -E "s/.*['\"](v[^'\"]+)['\"].*/\1/" \ - | tail -n1 - ) - if [[ -z "${VER:-}" ]]; then + VER=$(grep -Eo "APP_VERSION\s*=\s*['\"]v[^'\"]+['\"]" public/js/version.js | sed -E "s/.*['\"](v[^'\"]+)['\"].*/\1/") + if [[ -z "$VER" ]]; then echo "Could not parse APP_VERSION from version.js" >&2 exit 1 fi @@ -89,7 +76,7 @@ jobs: shell: bash run: | set -euo pipefail - VER="${{ steps.ver.outputs.version }}" # e.g. v1.8.2 + VER="${{ steps.ver.outputs.version }}" # e.g. v1.6.12 ZIP="FileRise-${VER}.zip" # Clean staging copy (exclude dotfiles you don’t want) @@ -215,8 +202,7 @@ jobs: uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.ver.outputs.version }} - # Point the tag at the same commit we checked out (handles workflow_run case) - target_commitish: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }} + target_commitish: ${{ github.sha }} name: ${{ steps.ver.outputs.version }} body_path: RELEASE_BODY.md generate_release_notes: false