2020-03-21 21:09:15 +01:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-09-14 11:37:38 +02:00
|
|
|
- name: Checkout
|
2022-03-01 20:28:48 +01:00
|
|
|
uses: actions/checkout@v3
|
2021-09-14 11:37:38 +02:00
|
|
|
|
|
|
|
- name: Setup go
|
2022-02-28 14:05:17 +01:00
|
|
|
uses: actions/setup-go@v3
|
2020-03-21 21:09:15 +01:00
|
|
|
with:
|
2022-02-20 12:32:34 +01: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
|
|
|
|
uses: actions/cache@v2
|
|
|
|
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
|
2022-03-04 09:02:22 +01:00
|
|
|
uses: docker/login-action@v1.14.1
|
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
|
2022-03-01 20:31:53 +01:00
|
|
|
uses: goreleaser/goreleaser-action@v2.9.1
|
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 }}
|