2021-03-19 14:05:44 +08:00
|
|
|
name: goreleaser
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*" # Will trigger only if tag is pushed matching pattern `v*` (Eg: `v0.1.0`)
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
goreleaser:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2021-09-25 18:33:18 +08:00
|
|
|
go-version: 1.17
|
2021-03-19 14:05:44 +08:00
|
|
|
|
|
|
|
- name: Login to Docker Registry
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Prepare Dependencies
|
|
|
|
run: |
|
2021-09-28 01:56:56 +08:00
|
|
|
make dist
|
2021-03-19 14:05:44 +08:00
|
|
|
|
|
|
|
- name: Run GoReleaser
|
|
|
|
uses: goreleaser/goreleaser-action@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: --parallelism 1 --rm-dist --skip-validate
|
|
|
|
env:
|
2021-03-19 18:26:34 +08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|