Release #64
This file contains 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: | |
inputs: | |
new_version: | |
description: New version number without prefix. (e.g. "1.1.0", "2.0.0", and more) | |
type: string | |
required: true | |
jobs: | |
goreleaser: | |
name: Make a release on GitHub | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
cache: true | |
go-version-file: go.mod | |
- name: Add tag and push it | |
env: | |
NEW_VERSION: ${{ github.event.inputs.new_version }} | |
run: | | |
git tag v"$NEW_VERSION" | |
git push origin v"$NEW_VERSION" | |
- name: Import GPG key | |
id: import_gpg | |
uses: crazy-max/[email protected] | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
- name: Git as GitHub Actions Bot | |
uses: Lucky3028/[email protected] | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |