Skip to content

Release

Release #4

Workflow file for this run

name: Release
on:
push:
tags: ["v*.*.**"]
workflow_dispatch:
env:
PGO_FILE: "default.pgo"
jobs:
release:
name: goreleaser-cross
runs-on: ubuntu-latest
container:
image: ghcr.io/goreleaser/goreleaser-cross:latest
steps:
- uses: actions/checkout@master
- name: Is ref tag?
if: (github.event_name == 'workflow_dispatch' && github.ref_type != 'tag')
run: exit 1
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: '**/go.sum'
- uses: actions/download-artifact@v4
id: artifact
with:
name: pgo
- name: Build PGO file
run: '[[ ! -f "${{ env.PGO_FILE }}" ]] && make pgo'
if: (success() || failure())
- run: git config --global --add safe.directory "$(pwd)"
- run: goreleaser release --clean
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"