ci: add goreleaser setup

This commit is contained in:
2022-05-24 00:26:14 +01:00
parent 64c234f07c
commit a5300f753b
3 changed files with 134 additions and 0 deletions

View File

@@ -19,3 +19,31 @@ jobs:
./bin/dotkatapult --port=8080 &
curl --silent --retry 10 --retry-delay 1 --retry-connrefused \
http://localhost:8080/
release:
runs-on: ubuntu-latest
needs: [test]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- name: Docker Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}