2020-03-21 21:09:15 +01:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
2022-03-17 13:11:22 +01:00
|
|
|
release:
|
|
|
|
types: [published]
|
2020-03-21 21:09:15 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Release
|
2022-10-22 14:35:56 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2020-03-21 21:09:15 +01:00
|
|
|
steps:
|
2021-09-14 11:37:38 +02:00
|
|
|
- name: Checkout
|
2023-09-08 09:32:00 +02:00
|
|
|
uses: actions/checkout@v4
|
2021-09-14 11:37:38 +02:00
|
|
|
|
|
|
|
- name: Setup go
|
2023-12-08 09:07:42 +01:00
|
|
|
uses: actions/setup-go@v5
|
2020-03-21 21:09:15 +01:00
|
|
|
with:
|
2022-10-22 14:35:56 +02:00
|
|
|
go-version: "1.17.x"
|
2021-09-14 11:37:38 +02:00
|
|
|
|
2022-02-26 10:56:51 +01:00
|
|
|
- name: Cache Go Dependencies
|
2022-03-25 09:02:11 +01:00
|
|
|
uses: actions/cache@v3
|
2022-02-26 10:56:51 +01:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
|
2021-09-14 11:37:38 +02:00
|
|
|
- name: Login to Docker Hub
|
2023-09-15 09:17:00 +02:00
|
|
|
uses: docker/login-action@v3.0.0
|
2020-03-21 21:09:15 +01:00
|
|
|
with:
|
2021-09-14 11:37:38 +02:00
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2022-02-20 12:35:53 +01:00
|
|
|
- name: Build Releases
|
2023-09-15 09:15:02 +02:00
|
|
|
uses: goreleaser/goreleaser-action@v5.0.0
|
2020-03-21 21:09:15 +01:00
|
|
|
with:
|
2021-09-14 11:37:38 +02:00
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
2020-03-21 22:30:41 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|