Skip to content
Closed
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
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,24 @@ jobs:
printf '%s\n' "$newer" >&2
exit 1
fi

github-release:
name: Create GitHub release
needs: publish
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
env:
TAG: ${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
steps:
- name: Create release
timeout-minutes: 2
run: |
if gh release view "$TAG" >/dev/null 2>&1; then
echo "Release $TAG already exists"
exit 0
fi
gh release create "$TAG" --verify-tag --generate-notes
Comment on lines +90 to +94

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Concurrent release runs fail

When two runs for the same tag reach the release job at the same time, gh release view lets both runs proceed, then the second gh release create fails because the release already exists, so its workflow run reports failure despite the release existing.

Make release creation idempotent so a concurrent already-exists result is treated as success.

Prompt for AI agents
In `.github/workflows/release.yml` at lines 90-94:

**Concurrent release runs fail**

When two runs for the same tag reach the release job at the same time, `gh release view` lets both runs proceed, then the second `gh release create` fails because the release already exists, so its workflow run reports failure despite the release existing.

Make release creation idempotent so a concurrent already-exists result is treated as success.

Comment on lines +75 to +94

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Release notes use wrong baseline

When an earlier tag's release job is delayed while a later tag's publish and release finish first, the concurrency group serializes only publish, so a later tag's github-release job can create its release before an earlier tag's job. --generate-notes can then use the wrong previous release as its baseline, producing notes that include changes from the earlier release.

Serialize release creation in tag order or specify the intended previous tag when generating notes.

Prompt for AI agents
In `.github/workflows/release.yml` at lines 75-94:

**Release notes use wrong baseline**

When an earlier tag's release job is delayed while a later tag's publish and release finish first, the concurrency group serializes only `publish`, so a later tag's `github-release` job can create its release before an earlier tag's job. `--generate-notes` can then use the wrong previous release as its baseline, producing notes that include changes from the earlier release.

Serialize release creation in tag order or specify the intended previous tag when generating notes.