Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/publish-v1.4.0-on-approval.yml
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"
Comment on lines +5 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate dispatch on the approval marker being added

The paths filter 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 👍 / 👎.


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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Distinguish draft and prerelease records from a stable release

When a supported manual run of release-package.yml has already created v1.4.0 as a draft or prerelease, this lookup succeeds and sets already=yes, so stable approval silently skips publication. The checked gh release view documentation exposes isDraft, isPrerelease, and publishedAt, confirming that a successful lookup is not equivalent to an existing public stable release; inspect those fields and promote or replace non-stable records instead of treating them as published.

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."
Loading