name: Release on: push: tags: ["v*"] workflow_dispatch: inputs: tag: description: Git tag to release (e.g. v0.4.0) required: true type: string permissions: contents: write jobs: goreleaser: name: GoReleaser runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.tag) || github.ref }} - name: Set up Go uses: actions/setup-go@v5 with: go-version: stable cache: true - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser version: "~> v2" args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}