From 5bafdb289f775c06616e704b991cfc2f77b43aa6 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 14:15:57 +0000 Subject: [PATCH] ci: add the manual release workflow to main Workflow dispatch only works for workflows on the default branch (main), and tags cannot be pushed from agent sessions. The workflow tags main and publishes the GitHub release. --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c5265f6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release + +# Tags main and publishes a GitHub release. Run it from the Actions tab after the +# release/ branch has been merged into main (GitFlow). +on: + workflow_dispatch: + inputs: + version: + description: Version to release, without the leading v (must match package.json on main) + required: true + type: string + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: main + - name: Check the version matches package.json + env: + VERSION: ${{ inputs.version }} + run: | + pkg=$(node -p "require('./package.json').version") + if [ "$pkg" != "$VERSION" ]; then + echo "package.json on main is $pkg, expected $VERSION" >&2 + exit 1 + fi + - name: Create the tag and the GitHub release + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ inputs.version }} + run: gh release create "v$VERSION" --target main --title "v$VERSION" --generate-notes