Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
push:
tags: ["v*.*.**"]
workflow_dispatch:
env:
PGO_FILE: "default.pgo"
jobs:
is-tag:
runs-on: ubuntu-latest
steps:
- name: Is ref tag?
if: >
(
github.ref_type != 'tag' &&
github.event_name == 'workflow_dispatch'
)
run: exit 1
release:
runs-on: ubuntu-latest
needs: is-tag
container:
image: ghcr.io/goreleaser/goreleaser-cross:latest
steps:
- uses: actions/checkout@master
- 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 }}"