switch to goreleaser for github releases #30
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: goreleaser | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract Release Notes | |
| run: | | |
| # This sed command finds the line starting with "# Version ${TAG}" | |
| # and prints until it hits the next line starting with "# Version" | |
| TAG=${{ github.ref_name }} | |
| sed -n "/^# Version ${TAG}/,/^# Version/p" CHANGELOG.md | sed '$d' > GORELEASER_NOTES.md | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v7.1.0 | |
| with: | |
| distribution: goreleaser | |
| # 'latest', 'nightly', or a semver | |
| version: "latest" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |