-
-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (36 loc) · 993 Bytes
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Release
on:
push:
tags: ["v*.*.**"]
workflow_dispatch:
inputs:
tag:
description: "Target tag to release"
required: true
type: string
env:
PGO_FILE: "default.pgo"
jobs:
release:
runs-on: ubuntu-latest
container:
image: ghcr.io/goreleaser/goreleaser-cross:latest
steps:
- uses: actions/checkout@master
with:
ref: pgo
- run: cp ${{ env.PGO_FILE }} /tmp
- uses: actions/checkout@master
with:
ref: "${{ inputs.tag || github.ref_name }}"
- run: cp /tmp/${{ env.PGO_FILE }} .
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: '**/go.sum'
- name: Build PGO file
run: '[ -f "${{ env.PGO_FILE }}" ] || make pgo'
- run: git config --global --add safe.directory "$(pwd)"
- run: goreleaser release --clean
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"