smtpdane tool release #6
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: smtpdane tool release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| # Control the GITHUB_TOKEN permissions; GitHub's docs on which permission scopes control what are a little lacking. | |
| # By having this block, all permissions not listed here are set to none. | |
| # | |
| # <https://goreleaser.com/ci/actions/> documents which scopes are needed for it. | |
| # Permissions assigned at job level. | |
| permissions: {} | |
| jobs: | |
| goreleaser: | |
| name: GoReleaser Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # Uploading archives as release artifacts is bundled into the contents: permission key! (goreleaser documents as content: but it's contents:). | |
| # packages: is for pushing docker images to github (ghcr.io) | |
| # actions: is for uploading artifacts | |
| contents: write | |
| packages: write | |
| actions: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| # NB: the `fetch-depth: 0` setting is documented by goreleaser | |
| # as a requirement, for the changelog feature to work correctly. | |
| fetch-depth: 0 | |
| # We don't need to work with the git remote after this, so: | |
| persist-credentials: false | |
| # If we had something suitable for a Docker image, here we would setup QEMU and BuildX | |
| - name: Set up Go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version: 'stable' | |
| check-latest: true | |
| # We are producing a release artifact, so should accept the penalty | |
| # cost of uncached builds and avoid the risk of cache poisoning via | |
| # PRs. | |
| cache: false | |
| - name: Basic Go integrity checks | |
| run: | | |
| go vet ./... | |
| t="$(go list -m -retracted -f '{{if .Retracted}}::error file=go.mod::{{.Path}} is retracted{{end}}' all)" | |
| if [ ".$t" != "." ]; then printf '%s\n' "$t"; exit 1; fi | |
| - name: Version / Environment Reporting | |
| run: | | |
| ./build/show.versions | |
| - name: Run GoReleaser | |
| id: goreleaser | |
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |