ReviewOS

also looking at this

craft-native/craft

fix(release): require matching tag and package versions

#292
Merged glennmichael123 wants to merge codex/release-tag-validation into main
4 files +108 -4
.github/workflows/release.ymlmodified+16-4
Changes to .github/workflows/release.yml
@@ -11,7 +11,19 @@ defaults:
1111 shell: bash
1212
1313jobs:
14 validate-release:
15 name: validate release identity
16 runs-on: ubuntu-latest
17 permissions:
18 contents: read
19 steps:
20 - uses: actions/checkout@v6
21 - uses: oven-sh/setup-bun@v2
22 - name: Validate tag and workspace versions
23 run: bun scripts/release-version.ts
24
1425 pantry:
26 needs: [validate-release]
1527 name: pantry (${{ matrix.platform.name }})
1628 strategy:
1729 fail-fast: false
@@ -326,8 +338,8 @@ jobs:
326338 # half of that bargain: the run goes red, naming the assets that are missing.
327339 verify-release:
328340 name: verify release assets
329 needs: [pantry]
330 if: ${{ !cancelled() }}
341 needs: [validate-release, pantry]
342 if: ${{ !cancelled() && needs.validate-release.result == 'success' }}
331343 runs-on: ubuntu-latest
332344 permissions:
333345 contents: read
@@ -413,8 +425,8 @@ jobs:
413425 # `bun install`, and publishes packages built from TypeScript. Signing a Zig
414426 # binary and publishing an SDK are independent, and the workflow now says
415427 # so. `!cancelled()` rather than `always()` so a cancelled run still stops.
416 needs: [pantry]
417 if: ${{ !cancelled() }}
428 needs: [validate-release, pantry]
429 if: ${{ !cancelled() && needs.validate-release.result == 'success' }}
418430 runs-on: ubuntu-latest
419431 permissions:
420432 contents: write