File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,11 +21,15 @@ jobs:
2121 with :
2222 go-version-file : go.mod
2323
24- - name : Set CLI version from tag
24+ - name : Create version tag for goreleaser
2525 env :
2626 GIT_TAG : ${{ github.ref_name }}
2727 run : |
28- echo "GORELEASER_CURRENT_TAG=${GIT_TAG#cli-}" >> $GITHUB_ENV
28+ # Goreleaser needs a semver tag on HEAD. Create a temporary
29+ # v* tag from the cli-v* tag so archives are named correctly.
30+ VERSION_TAG="${GIT_TAG#cli-}"
31+ git tag "$VERSION_TAG"
32+ echo "VERSION_TAG=$VERSION_TAG" >> $GITHUB_ENV
2933
3034 - uses : goreleaser/goreleaser-action@v6
3135 with :
3438 env :
3539 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3640
41+ - name : Clean up version tag
42+ if : always()
43+ run : git tag -d "$VERSION_TAG" 2>/dev/null || true
44+
3745 - name : Load secrets from 1Password
3846 uses : 1password/load-secrets-action@v2
3947 with :
You can’t perform that action at this time.
0 commit comments