Skip to content

Release

Release #12

Workflow file for this run

name: Release
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
# run only against tags
tags:
- 'v*'
create:
# run only against tags
tags:
- 'v*'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages as well
permissions:
contents: write
pages: write
id-token: write
jobs:
binaries:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch Go version
run: |
GO_VERSION=$(perl -ne 'print "$1\n" if /FROM golang:([0-9.]+)/' Dockerfile | head -n1)
[ -n "$GO_VERSION" ] || exit 1
echo "go_version=$GO_VERSION" >> $GITHUB_ENV
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: "${{ env.go_version }}"
- name: Binaries Release
uses: goreleaser/goreleaser-action@v2.9.1
with:
version: ~> 1.5.0
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}