2021-05-04 16:57:33 -05:00
|
|
|
name: release
|
2021-08-09 11:07:26 -05:00
|
|
|
on:
|
2021-05-04 16:57:33 -05:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
|
2021-08-30 13:06:20 -05:00
|
|
|
env:
|
|
|
|
GO_VERSION: 1.17
|
|
|
|
|
2021-05-04 16:57:33 -05:00
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-go@v1
|
|
|
|
with:
|
2021-08-30 13:06:20 -05:00
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2021-05-04 16:57:33 -05:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
if: ${{ !env.ACT }}
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
- name: GoReleaser
|
|
|
|
uses: goreleaser/goreleaser-action@v1
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
|
|
|
|
- name: Chocolatey
|
|
|
|
uses: ./.github/actions/choco
|
|
|
|
with:
|
|
|
|
version: ${{ github.ref }}
|
|
|
|
apiKey: ${{ secrets.CHOCO_APIKEY }}
|