feat: simplify release to workflow_dispatch only#968
Conversation
Remove the tag push trigger from the release workflow. Now the only way to release is via workflow_dispatch (Actions UI or `gh workflow run`). The workflow reads the version from package.json, builds everything, then creates and pushes the git tag only after builds succeed. This eliminates the multi-step tag push dance and reduces the release process to: npm version → git push → trigger workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
📰 DEVELOPING STORY: Smoke Copilot reports was cancelled. Our correspondents are investigating the incident... |
|
💫 TO BE CONTINUED... Smoke Claude was cancelled! Our hero faces unexpected challenges... |
|
🌑 The shadows whisper... Smoke Codex was cancelled. The oracle requires further meditation... |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
- Add concurrency group to prevent duplicate releases - Add branch guard (only main or maintenance v*.x branches) - Use `git tag -l` instead of `git rev-parse` for precise tag checks - Document that npm version creates a local tag (don't push it) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
There was a problem hiding this comment.
Pull request overview
This PR simplifies the release process by removing the push: tags trigger and moving tag creation into the workflow itself. The release workflow now reads the version from package.json, builds all artifacts, and only creates the git tag after successful builds—preventing dangling tags from failed builds.
Changes:
- Release workflow trigger changed from
push: tagstoworkflow_dispatchonly - Version extraction simplified to always read from
package.json - Git tag creation moved into the workflow after successful builds
- Documentation updated to reflect the new 3-step process:
npm version→git push→ trigger workflow
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/release.yml |
Removed tag trigger, simplified version extraction logic, added manual tag creation step after builds, added fetch-tags option for changelog generation |
docs/releasing.md |
Updated release steps to reflect workflow_dispatch trigger, removed references to pushing tags manually, updated troubleshooting and maintenance instructions |
Comments suppressed due to low confidence (1)
docs/releasing.md:38
- For consistency and clarity, the documentation should mention that when using the Actions UI (line 35), users need to select the branch before clicking "Run workflow". This is especially important for maintenance releases but applies to all releases.
Consider adding a note:
Trigger the release from the **Actions** tab (select the branch, then click "Run workflow") or CLI:
### 3. Run the Release Workflow
Trigger the release from the **Actions** tab or CLI:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/release.yml
Outdated
| - name: Create git tag | ||
| run: | | ||
| TAG="${{ needs.setup.outputs.version }}" | ||
| if [ -n "$(git tag -l "$TAG")" ]; then | ||
| echo "Tag $TAG already exists, skipping creation" | ||
| else | ||
| git tag "$TAG" | ||
| git push origin "$TAG" | ||
| echo "Created and pushed tag $TAG" | ||
| fi | ||
|
|
There was a problem hiding this comment.
The manual git tag creation step is missing git user configuration and creates a logical conflict with the GitHub Release action.
Issues:
-
The
git tagandgit pushcommands will fail without git user configuration. Add before line 342:git config user.name "github-actions[bot]"git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
-
The
softprops/action-gh-releaseaction (line 452) automatically creates tags if they don't exist. Since you're manually creating the tag here, you should either:- Remove this manual tag creation step entirely and let the release action handle it, OR
- Document why the tag must be created before the release (e.g., for changelog generation)
-
If keeping this step, the GitHub API changelog generation (line 371-379) may fail because the tag was just pushed seconds ago and might not be immediately available in GitHub's API. The fallback to
git logshould handle this, but it will result in inconsistent changelog formatting.
| - name: Create git tag | |
| run: | | |
| TAG="${{ needs.setup.outputs.version }}" | |
| if [ -n "$(git tag -l "$TAG")" ]; then | |
| echo "Tag $TAG already exists, skipping creation" | |
| else | |
| git tag "$TAG" | |
| git push origin "$TAG" | |
| echo "Created and pushed tag $TAG" | |
| fi |
docs/releasing.md
Outdated
| @@ -24,32 +22,31 @@ npm version minor | |||
| npm version major | |||
| ``` | |||
|
|
|||
| This will: | |||
| - Update `package.json` version | |||
| - Create a git commit with the version change | |||
| - Create a git tag (e.g., `v0.1.1`) | |||
| This updates `package.json` and creates a version commit (and a local tag) automatically. | |||
|
|
|||
| ### 2. Push Changes and Tag | |||
| ### 2. Push the Version Commit | |||
|
|
|||
| ```bash | |||
| # Push the version commit | |||
| git push origin main | |||
|
|
|||
| # Push the tag (this triggers the release workflow) | |||
| git push origin --tags | |||
| ``` | |||
There was a problem hiding this comment.
Critical documentation issue: By default, npm version creates BOTH a commit AND a git tag locally. The documentation states it only creates a commit (line 25), which is incorrect and will cause issues.
When users run npm version patch and then git push origin main, the local tag will also be pushed (if they have push.followTags=true in their git config) OR it will remain locally and conflict with the workflow-created tag.
Solutions:
-
Update the documentation to use
--no-git-tag-versionflag (recommended):npm version patch --no-git-tag-version git add package.json package-lock.json git commit -m "chore: bump version to X.Y.Z" -
OR add a step to delete the local tag before pushing:
npm version patch # creates commit + tag git tag -d v0.1.1 # delete local tag git push origin main
-
OR add
git-tag-version=falseto.npmrcto disable tag creation globally.
docs/releasing.md
Outdated
| @@ -206,6 +193,7 @@ For backporting fixes to older major versions: | |||
| 1. Create a maintenance branch: `git checkout -b v0.x` | |||
| 2. Cherry-pick or apply fixes | |||
| 3. Update version: `npm version patch` | |||
There was a problem hiding this comment.
The documentation for maintenance releases needs to specify which branch to target when running the workflow. The gh workflow run command should include a --ref parameter to run on the maintenance branch.
Update line 195 to:
gh workflow run release.yml --ref v0.xOtherwise, the workflow will run on the default branch (main) instead of the maintenance branch, which would release the wrong version.
This issue also appears on line 35 of the same file.
C++ Build Test Results
Overall: PASS ✅ All C++ projects built successfully.
|
Bun Build Test Results
Overall: PASS ✅ All Bun projects built and tested successfully.
|
Deno Build Test Results
Overall: ✅ PASS All Deno tests completed successfully.
|
🟢 Smoke Test PASSEDLast 2 Merged PRs:
Test Results:
cc @Mossaka
|
Node.js Build Test Results
Overall: PASS ✅ All Node.js projects successfully installed dependencies and passed their test suites.
|
|
Smoke Test Results (Run #22168490413) ✅ GitHub MCP (list_pull_requests) Status: PASS
|
.NET Build Test Results ✅All .NET projects successfully restored, built, and ran.
Overall: PASS Project Detailshello-world: Successfully printed "Hello, World!"
|
Rust Build Test Results
Overall: PASS ✅ All Rust projects built successfully and all tests passed.
|
|
feat: add ARM64 binary support for awf CLI
|
Java Build Test Results
Overall: PASS ✅ All Java projects compiled successfully and all tests passed.
|
The entire release process is now a single workflow dispatch. Select the bump type (patch/minor/major) in the UI or pass it via CLI: gh workflow run release.yml -f bump=patch The workflow bumps package.json, commits, tags, builds all artifacts, and publishes the GitHub release. No local steps required. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
Bun Build Test Results
Overall: PASS ✅ All Bun projects successfully installed dependencies and passed tests.
|
C++ Build Test Results
Overall: PASS ✅ All C++ projects built successfully.
|
Go Build Test Results
Overall: PASS ✅ All Go projects successfully downloaded dependencies and passed their test suites.
|
.NET Build Test Results
Overall: PASS Both projects successfully restored NuGet packages, built, and ran without errors.
|
Smoke Test Results (Copilot)
Status: PASS ✅ cc @Mossaka (author)
|
Rust Build Test Results
Overall: PASS ✅ All Rust projects built and tested successfully.
|
Build Test: Deno - Results
Overall: ✅ PASS All Deno tests completed successfully.
|
Claude Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Status: PASS
|
Node.js Build Test ResultsAll tests completed successfully! ✅
Overall: PASS ✅ All Node.js projects built and tested successfully.
|
Java Build Test Results ✅All Java projects compiled and tested successfully through the firewall.
Overall: PASS Maven proxy configuration:
|
|
Merged PRs: feat: add ARM64 binary support for awf CLI; docs: add api-proxy image publishing details to release guide
|
Summary
workflow_dispatchwith a bump type selectordocs/releasing.mdto reflect the one-step processBefore (old flow)
npm version patch(bumps version, creates commit + tag locally)git push origin main(push version commit)git push origin --tags(push tag to trigger workflow)After (new flow)
Or from the GitHub UI: Actions > Release > Run workflow > select bump type > Run workflow.
That's it. The workflow handles everything:
package.jsonversionKey design decisions
bump-versionjob runsnpm version --no-git-tag-version, commits asgithub-actions[bot], and pushes the commit + tagref: ${{ needs.bump-version.outputs.version }}to ensure they build from the version-bumped commitconcurrency: { group: release }prevents duplicate releases if triggered twicemainandv*.xmaintenance branches are allowedTest plan
workflow_dispatchwithbumpinput renders correctly in the Actions UIbump-versionjob correctly bumps, commits, tags, and pushesbump-version🤖 Generated with Claude Code