From c0428153ec6496cbbe89cef1e48672e419daeeff Mon Sep 17 00:00:00 2001 From: us Date: Fri, 12 Jun 2026 16:16:24 +0300 Subject: [PATCH] ci: allow release build via workflow_dispatch The Release workflow only triggered on `push: tags`, but release-please creates tags with the default GITHUB_TOKEN, which does not trigger downstream workflows. As a result no binary/Homebrew formula has been published since v0.2.0. Add a workflow_dispatch input (tag) and use it for checkout ref, version, and the release upload target so any tag can be (re)built manually. --- .github/workflows/release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dfefeed..ce7d2c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,12 @@ on: push: tags: - "v*" + workflow_dispatch: + inputs: + tag: + description: "Tag to build and publish (e.g. v0.3.2)" + required: true + type: string jobs: build: @@ -11,10 +17,14 @@ jobs: runs-on: macos-26 permissions: contents: write + env: + RELEASE_TAG: ${{ inputs.tag || github.ref_name }} steps: - name: Checkout uses: actions/checkout@v4 + with: + ref: ${{ inputs.tag || github.ref_name }} - name: Select Xcode uses: maxim-lobanov/setup-xcode@v1 @@ -28,7 +38,7 @@ jobs: - name: Create tarball run: | - VERSION="${GITHUB_REF_NAME}" + VERSION="${RELEASE_TAG}" tar -czf "mocker-${VERSION}-arm64-apple-macosx.tar.gz" \ -C .build/release mocker echo "TARBALL=mocker-${VERSION}-arm64-apple-macosx.tar.gz" >> $GITHUB_ENV @@ -43,6 +53,7 @@ jobs: - name: Upload binary to release uses: softprops/action-gh-release@v2 with: + tag_name: ${{ inputs.tag || github.ref_name }} files: ${{ env.TARBALL }} - name: Update Homebrew formula