Release 2.9.0 #33
Workflow file for this run
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: | |
push: | |
tags: [ v*.*.* ] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: GPG config | |
run: | | |
mkdir -p ~/.gnupg | |
cat << EOF >> ~/.gnupg/gpg.conf | |
keyserver hkps://keys.openpgp.org | |
auto-key-import | |
auto-key-retrieve | |
EOF | |
- | |
name: Verify tag signature | |
run: | | |
# NOTE: Solve the problem with Github action checkout | |
# https://github.com/actions/checkout/issues/290 | |
git fetch --tags --force | |
version=${GITHUB_REF#refs/tags/*} | |
git show $version | |
git tag -v $version | |
- | |
name: Log into registry ${{ env.REGISTRY }} | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22 | |
check-latest: true | |
cache: true | |
- | |
name: Build release changelog | |
run: | | |
version=${GITHUB_REF#refs/tags/v*} | |
mkdir -p tmp | |
sed '/^# \['$version'\]/,/^# \[/!d;//d;/^\s*$/d' CHANGELOG.md > tmp/release_changelog.md | |
- | |
name: Release | |
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 | |
with: | |
distribution: goreleaser | |
version: v1.10.3 | |
args: release --rm-dist --release-notes=tmp/release_changelog.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |