Skip to content

ci(release): replace softprops/action-gh-release with gh cli - #17

Merged
astykyj merged 2 commits into
mainfrom
fix/release-gh-cli
May 3, 2026
Merged

ci(release): replace softprops/action-gh-release with gh cli#17
astykyj merged 2 commits into
mainfrom
fix/release-gh-cli

Conversation

@heath-s

@heath-s heath-s commented May 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The v0.5.1 release run (25098850674) failed before any step ran because softprops/action-gh-release@v2 is not on the org's allowed-actions list.
  • Replace it with the runner's bundled gh CLI so the release workflow only depends on actions the org already permits (actions/* plus oven-sh/setup-bun).
  • Make the upload idempotent: re-upload the asset with --clobber when the tag already has a release, otherwise create a new release with auto-generated notes.

Key changes

  • .github/workflows/release.yml: swap the third-party action for a gh release view / upload --clobber / create --generate-notes flow guarded by set -euo pipefail. GH_TOKEN: \${{ github.token }} is scoped to the step; the existing contents: write job permission is reused.
  • .gitignore: add .worktrees/ so locally-created git worktrees stay untracked.

Test plan

  • Re-run the v0.5.1 Release workflow (or trigger via workflow_dispatch) and confirm the job starts (no "workflow file issue" preflight failure).
  • Verify the GitHub release is created with Stave-macOS.zip attached and auto-generated notes populated.
  • Re-run the same release once and confirm the asset is replaced via --clobber instead of erroring.

🤖 Generated with Claude Code

Org GitHub Actions allowlist blocks softprops/action-gh-release@v2,
which made the v0.5.1 release run fail before any step executed.
Switch to the runner's bundled gh CLI to avoid the third-party action
and make the release upload idempotent: if the tag already has a
release we re-upload the asset with --clobber, otherwise we create a
new release with generated notes.

Also add .worktrees/ to .gitignore so locally created worktrees stay
untracked.
@heath-s heath-s self-assigned this May 3, 2026
@heath-s
heath-s requested review from astyfx, astykyj and Copilot and removed request for astyfx and astykyj May 3, 2026 00:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the release automation to stop depending on softprops/action-gh-release and instead use the runner-provided GitHub CLI, while also ignoring the repository's local temporary worktree directory. It fits the codebase's release workflow by keeping artifact publishing within the org's allowed GitHub Actions/tooling footprint.

Changes:

  • Replace the third-party release action in .github/workflows/release.yml with a shell-based gh release view/upload/create flow.
  • Make release asset uploads rerunnable by using gh release upload --clobber when the release already exists.
  • Ignore .worktrees/ in .gitignore to keep documented temporary worktrees untracked.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
.gitignore Adds ignore rule for the repo’s temporary worktree directory.
.github/workflows/release.yml Reworks release publishing to use gh CLI instead of a third-party action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@astykyj
astykyj merged commit e275ad5 into main May 3, 2026
3 checks passed
@astykyj
astykyj deleted the fix/release-gh-cli branch May 3, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants