2021-05-05 05:57:33 +08:00
|
|
|
name: release
|
2021-08-10 00:07:26 +08:00
|
|
|
on:
|
2021-05-05 05:57:33 +08:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
|
2021-08-31 02:06:20 +08:00
|
|
|
env:
|
2022-03-30 04:10:32 +08:00
|
|
|
GO_VERSION: 1.18
|
2021-08-31 02:06:20 +08:00
|
|
|
|
2021-05-05 05:57:33 +08:00
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-14 23:14:32 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-05-05 05:57:33 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-04-11 10:28:50 +08:00
|
|
|
- uses: actions/setup-go@v3
|
2021-05-05 05:57:33 +08:00
|
|
|
with:
|
2021-08-31 02:06:20 +08:00
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2022-04-20 03:43:30 +08:00
|
|
|
check-latest: true
|
2022-03-29 04:05:07 +08:00
|
|
|
- uses: actions/cache@v3
|
2021-05-05 05:57:33 +08:00
|
|
|
if: ${{ !env.ACT }}
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
- name: GoReleaser
|
2022-12-19 23:46:21 +08:00
|
|
|
uses: goreleaser/goreleaser-action@v4
|
2021-05-05 05:57:33 +08:00
|
|
|
with:
|
2021-10-25 00:36:09 +08:00
|
|
|
version: latest
|
2022-06-21 08:02:49 +08:00
|
|
|
args: release --rm-dist
|
2021-05-05 05:57:33 +08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
|
|
|
|
- name: Chocolatey
|
|
|
|
uses: ./.github/actions/choco
|
|
|
|
with:
|
|
|
|
version: ${{ github.ref }}
|
|
|
|
apiKey: ${{ secrets.CHOCO_APIKEY }}
|
2021-12-09 02:49:33 +08:00
|
|
|
push: true
|