2022-07-07 14:17:23 +08:00
|
|
|
name: Release
|
2020-03-26 23:44:17 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-07-07 14:17:23 +08:00
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
env:
|
|
|
|
GO_VERSION: 1.18
|
2020-03-26 23:44:17 +08:00
|
|
|
|
|
|
|
jobs:
|
2022-07-07 14:17:23 +08:00
|
|
|
goreleaser:
|
2020-03-26 23:44:17 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-07 14:17:23 +08:00
|
|
|
- name: Checkout Source Code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Go Environment
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Run GoReleaser
|
|
|
|
uses: goreleaser/goreleaser-action@v3
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|