commit c82048ab25093eae04341740a73b33b8123bc13d from: ale date: Fri Jul 24 00:48:09 2026 UTC Take the release tag as a workflow_dispatch input Selecting 'Use workflow from: Tag v0.1.0' failed with 'Workflow does not exist or does not have a workflow_dispatch trigger in this tag' -- that tag's own snapshot of the workflow predates the trigger being added, so GitHub can't see it there. Instead, run manually from the main branch (which always has the current trigger definition) and pass the target tag as an input; checkout uses that tag explicitly so the build still reflects the tagged code, and the release step tags the release with it. Falls back to github.ref_name for real 'push: tags' events, where inputs.tag is unset. commit - 2d09ada8eb7ccdaaeaceb0cd6e2053ffedbf301e commit + c82048ab25093eae04341740a73b33b8123bc13d blob - e14b2569b0d07deb4414e6613968aa130b7a8dc9 blob + 9b9c7b6d6bc3179c52bf9945412d1e1976b4f08a --- .github/workflows/release.yml +++ .github/workflows/release.yml @@ -5,9 +5,14 @@ on: tags: - "v*" # Manual fallback: mirrored pushes (e.g. Forgejo -> GitHub) don't always - # emit the `push` event Actions listens for. Run this against the tag you - # want to release from the "Run workflow" dropdown. + # emit the `push` event Actions listens for. Always run this from the + # "main" branch (so this trigger definition is present) and provide the + # tag to release as an input; it does not need to pre-date the tag itself. workflow_dispatch: + inputs: + tag: + description: "Tag to release (e.g. v0.1.0)" + required: true permissions: contents: write @@ -18,9 +23,12 @@ jobs: runs-on: ubuntu-latest env: PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} + RELEASE_TAG: ${{ inputs.tag || github.ref_name }} steps: - name: Checkout uses: actions/checkout@v4 + with: + ref: ${{ env.RELEASE_TAG }} - name: Set up JDK 21 uses: actions/setup-java@v4 @@ -40,10 +48,8 @@ jobs: - name: Create GitHub release uses: softprops/action-gh-release@v2 with: - # softprops/action-gh-release only infers the tag automatically on - # a real `push` tag event; workflow_dispatch runs need it explicit. - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} + tag_name: ${{ env.RELEASE_TAG }} + name: ${{ env.RELEASE_TAG }} generate_release_notes: true files: build/distributions/*.zip