diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c66f0da..e789d51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,11 @@ on: push: tags: - "v*" + workflow_dispatch: + inputs: + tag: + description: "Bare tag name to release (e.g. v0.20.0, not refs/tags/v0.20.0)" + required: true permissions: {} @@ -37,6 +42,7 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: + ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }} persist-credentials: false - name: Build and upload @@ -49,6 +55,7 @@ jobs: tar: unix zip: windows checksum: sha256 + ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.tag) || github.ref }} env: GITHUB_TOKEN: ${{ github.token }}