2022-11-04 21:02:52 +01:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Release
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup go
|
2023-03-17 09:59:12 +01:00
|
|
|
uses: actions/setup-go@v4
|
2022-11-04 21:02:52 +01:00
|
|
|
with:
|
2022-11-04 21:14:18 +01:00
|
|
|
go-version: "1.19.x"
|
2022-11-04 21:02:52 +01:00
|
|
|
|
|
|
|
- name: Cache Go Dependencies
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Login to Docker Hub
|
2023-06-09 09:58:26 +02:00
|
|
|
uses: docker/login-action@v2.2.0
|
2022-11-04 21:02:52 +01:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build Releases
|
2023-09-08 09:31:19 +02:00
|
|
|
uses: goreleaser/goreleaser-action@v4.6.0
|
2022-11-04 21:02:52 +01:00
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|