41 lines
968 B
YAML
41 lines
968 B
YAML
name: release
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
env:
|
|
GO_VERSION: 1.18
|
|
|
|
jobs:
|
|
release:
|
|
name: release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
check-latest: true
|
|
- uses: actions/cache@v3
|
|
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@v3
|
|
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 }}
|
|
push: true
|