update to Go 1.21.1 (#62) #55
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: Release | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "v*.*.*" | |
jobs: | |
release-binary: | |
runs-on: ubuntu-latest | |
if: github.ref_type == 'tag' | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Export constant environmental variables | |
uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: .github/workflows/constants.env | |
- name: Checkout tags | |
run: git fetch --force --tags | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }}.x | |
check-latest: true | |
cache: true | |
- name: Install cosign | |
uses: sigstore/cosign-installer@main | |
- name: Build and release with goreleaser | |
uses: goreleaser/goreleaser-action@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release |