Repository navigation
Release automation: guarded public stable v1.4.0 approval trigger #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Approve public stable v1.4.0 | ||
|
|
||
| # One-time source-controlled approval. Ordinary commits cannot trigger a release. | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - ".github/release/v1.4.0.approved" | ||
|
|
||
| permissions: | ||
| actions: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| dispatch_verified_release: | ||
| runs-on: ubuntu-latest | ||
| if: github.ref == 'refs/heads/main' | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Confirm stable release has not already been published | ||
| id: already_published | ||
| shell: bash | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| GH_REPO: ${{ github.repository }} | ||
| run: | | ||
| if gh release view v1.4.0 --repo "$GH_REPO" >/dev/null 2>&1; then | ||
| echo "already=yes" >> "$GITHUB_OUTPUT" | ||
| echo "v1.4.0 already published; skipping duplicate dispatch." | ||
| exit 0 | ||
|
Comment on lines
+27
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a supported manual run of Useful? React with 👍 / 👎. |
||
| fi | ||
| echo "Verified v1.4.0 not yet published. Dispatching guarded Windows release." | ||
|
|
||
| - name: Dispatch Windows release workflow | ||
| if: steps.already_published.outputs.already != 'yes' | ||
| shell: bash | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| GH_REPO: ${{ github.repository }} | ||
| run: | | ||
| gh workflow run release-package.yml --repo "$GH_REPO" --ref main \ | ||
| -f version=1.4.0 \ | ||
| -f publish_release=true \ | ||
| -f prerelease=false \ | ||
| -f draft=false \ | ||
| -f release_notes_file=docs/RELEASE_NOTES_v1.4.0.md | ||
| echo "Dispatched publish_release=true, prerelease=false, draft=false." | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
pathsfilter matches every change to this pathname, including edits and deletion, rather than only creation. If the initial release attempt fails and an operator removes the marker to revoke or clean up the approval, that removal starts another run which can publish the stable release unexpectedly. Inspect the change status or at least verify that the marker exists before dispatching.Useful? React with 👍 / 👎.