ci: revert but keep delay
This commit is contained in:
28
.github/workflows/release-on-version.yml
vendored
28
.github/workflows/release-on-version.yml
vendored
@@ -24,39 +24,26 @@ jobs:
|
|||||||
needs: delay
|
needs: delay
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
concurrency:
|
concurrency:
|
||||||
# Cancel older runs for the same branch/ref so only the latest proceeds
|
group: release-${{ github.ref }}-${{ github.sha }}
|
||||||
group: release-${{ github.ref }}
|
cancel-in-progress: false
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout correct ref
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
- name: Ensure tags available
|
||||||
run: |
|
run: |
|
||||||
git fetch --tags --force --prune --quiet
|
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
|
- name: Read version from version.js
|
||||||
id: ver
|
id: ver
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
echo "version.js at commit: $(git rev-parse --short HEAD)"
|
VER=$(grep -Eo "APP_VERSION\s*=\s*['\"]v[^'\"]+['\"]" public/js/version.js | sed -E "s/.*['\"](v[^'\"]+)['\"].*/\1/")
|
||||||
sed -n '1,80p' public/js/version.js || true
|
if [[ -z "$VER" ]]; then
|
||||||
|
|
||||||
VER=$(
|
|
||||||
grep -Eo "APP_VERSION[^\\n]*['\"]v[0-9][^'\"]+['\"]" public/js/version.js \
|
|
||||||
| sed -E "s/.*['\"](v[^'\"]+)['\"].*/\1/" \
|
|
||||||
| tail -n1
|
|
||||||
)
|
|
||||||
if [[ -z "${VER:-}" ]]; then
|
|
||||||
echo "Could not parse APP_VERSION from version.js" >&2
|
echo "Could not parse APP_VERSION from version.js" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -89,7 +76,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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"
|
ZIP="FileRise-${VER}.zip"
|
||||||
|
|
||||||
# Clean staging copy (exclude dotfiles you don’t want)
|
# Clean staging copy (exclude dotfiles you don’t want)
|
||||||
@@ -215,8 +202,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.ver.outputs.version }}
|
tag_name: ${{ steps.ver.outputs.version }}
|
||||||
# Point the tag at the same commit we checked out (handles workflow_run case)
|
target_commitish: ${{ github.sha }}
|
||||||
target_commitish: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
|
|
||||||
name: ${{ steps.ver.outputs.version }}
|
name: ${{ steps.ver.outputs.version }}
|
||||||
body_path: RELEASE_BODY.md
|
body_path: RELEASE_BODY.md
|
||||||
generate_release_notes: false
|
generate_release_notes: false
|
||||||
|
|||||||
Reference in New Issue
Block a user