Skip to content

ci(release): add workflow_dispatch trigger for manual releases#3

Merged
anonymousAAK merged 2 commits into
mainfrom
claude/wizardly-lovelace-GIOEL
Jun 5, 2026
Merged

ci(release): add workflow_dispatch trigger for manual releases#3
anonymousAAK merged 2 commits into
mainfrom
claude/wizardly-lovelace-GIOEL

Conversation

@anonymousAAK
Copy link
Copy Markdown
Owner

Summary

Adds a manual workflow_dispatch trigger to release.yml so a release can be launched from the Actions tab (or the API) without pushing a v* tag locally. The existing tag-push path is unchanged.

How it works

On workflow_dispatch, the goreleaser job:

  1. Resolves the version from the optional version input, falling back to the repo's VERSION file when omitted.
  2. Creates and pushes the v<version> tag from CI. Tags pushed with GITHUB_TOKEN do not re-trigger this workflow, so there's no double run.
  3. Runs goreleaser on that tag as before (public release, since draft: false).

The resolved version is exposed as a job output and consumed by the publish-npm / publish-pypi jobs (instead of GITHUB_REF_NAME), so both the tag-push and dispatch paths publish the same version.

Usage

After merge: Actions → release → Run workflow (optionally enter a version; defaults to VERSION = 0.1.4). This builds the binaries, publishes a GitHub release, and publishes bumblebee-scan to npm and PyPI (requires the NPM_TOKEN / PYPI_TOKEN repo secrets).

Notes

  • Requires persist-credentials: true on the goreleaser checkout so CI can push the tag; the job already has contents: write.
  • A guard fails fast if the target tag already exists on origin.

https://claude.ai/code/session_01DYdxAiByG5AscGpe7fxzdT


Generated by Claude Code

The release workflow only triggered on a v* tag push, which is awkward in
environments that cannot push tags. Add a workflow_dispatch trigger that:
- resolves the version from the input (or the VERSION file when omitted),
- creates and pushes the v<version> tag from CI (GITHUB_TOKEN-pushed tags
  do not re-trigger this workflow, so there is no double run),
- threads the resolved version to the npm/PyPI publish jobs via a job
  output instead of GITHUB_REF_NAME, so both the tag-push and dispatch
  paths publish the same version.

The existing tag-push path is unchanged.

https://claude.ai/code/session_01DYdxAiByG5AscGpe7fxzdT
Copilot AI review requested due to automatic review settings June 5, 2026 08:54
Copy link
Copy Markdown

Copilot AI left a comment

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 pipeline to support manually-triggered releases via workflow_dispatch, while keeping the existing tag-push release behavior intact. It also standardizes how downstream publish jobs (npm/PyPI) derive the release version so both paths publish consistent artifacts.

Changes:

  • Add a workflow_dispatch trigger with an optional version input.
  • Resolve the release version in the goreleaser job, emit it as a job output, and (on manual runs) create/push the corresponding v<version> tag.
  • Update npm/PyPI publish jobs to use the resolved version output instead of GITHUB_REF_NAME.

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

Comment on lines +49 to +54
if [ -z "$VERSION" ]; then
echo "could not resolve a version to release" >&2
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "resolved release version: v$VERSION"
Comment on lines +28 to +30
# Needed so the workflow_dispatch path can push the release tag.
# Tags pushed with GITHUB_TOKEN do not re-trigger this workflow.
persist-credentials: true
Add an auto-release workflow that watches the VERSION file on main and,
when it changes to a version without an existing tag, dispatches the
release workflow for that version. The release workflow then creates the
tag and publishes to npm + PyPI, so all build/publish logic stays in one
place and manual tag/dispatch releases are unaffected.

Uses workflow_dispatch to start the release, which is the documented
exception to GITHUB_TOKEN not re-triggering workflows, so no PAT is
needed.

https://claude.ai/code/session_01DYdxAiByG5AscGpe7fxzdT
@anonymousAAK anonymousAAK merged commit cc8cced into main Jun 5, 2026
7 checks passed
@anonymousAAK anonymousAAK deleted the claude/wizardly-lovelace-GIOEL branch June 5, 2026 15:39
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.

2 participants