fix: Set release fetch-depth to 0 (revert change in #49) #41
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - | |
| name: Set up Go | |
| uses: actions/setup-go@v5 | |
| - | |
| name: Update version.go with Git tag and commit SHA | |
| run: | | |
| sed -i 's/version *= *"[^"]*"/version = "${{ github.ref_name }}"/' cmd/version.go | |
| sed -i 's/commit *= *"[^"]*"/commit = "${{ github.sha }}"/' cmd/version.go | |
| - | |
| name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v4 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }} |