ci: switch to setup-go v4 #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: releasing | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.21 | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Check out the source code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Avoid running against a shallow clone | |
- name: Force fetch upstream tags | |
run: git fetch --force --tags | |
- name: Restore the Go modules cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: go-${{ runner.os }}-${{ hashFiles('go.mod') }} | |
restore-keys: | | |
go-${{ runner.os }}- | |
- name: Release | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |