2020-12-28 19:09:59 +01:00
|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "[0-9]+.[0-9]+.[0-9]+"
|
|
|
|
- "[0-9]+.[0-9]+.[0-9]+-*"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
env:
|
|
|
|
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-07 15:19:41 +01:00
|
|
|
uses: actions/checkout@v3
|
2020-12-28 19:09:59 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Go
|
2023-03-20 13:32:24 +01:00
|
|
|
uses: actions/setup-go@v4
|
2020-12-28 19:09:59 +01:00
|
|
|
with:
|
2023-03-20 20:35:16 +01:00
|
|
|
go-version: 1.20
|
2020-12-28 19:09:59 +01:00
|
|
|
|
2020-12-28 20:00:25 +01:00
|
|
|
- name: Setup docker buildx
|
2022-05-09 13:44:15 +02:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2020-12-28 20:00:25 +01:00
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
2020-12-28 19:09:59 +01:00
|
|
|
- name: Docker login
|
2022-05-09 13:44:41 +02:00
|
|
|
uses: docker/login-action@v2
|
2020-12-28 19:09:59 +01:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Run GoReleaser
|
2022-12-19 02:32:08 +01:00
|
|
|
uses: goreleaser/goreleaser-action@v4
|
2020-12-28 19:09:59 +01:00
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|