-
Notifications
You must be signed in to change notification settings - Fork 459
83 lines (73 loc) · 2.4 KB
/
Copy pathgoreleaser.yml
File metadata and controls
83 lines (73 loc) · 2.4 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: goreleaser
on:
pull_request:
paths:
- .github/workflows/goreleaser.yml
- .goreleaser.yaml
push:
tags:
- "v*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: thiagokokada/free-disk-space@9a03d73a373bab1e204b8815f5c7752392482762
with:
# All of these do save some disk space, but are also somewhat slow to delete.
# So we keep them to just speed up the workflow overall.
android: false
aws-cli: false
debug: false
docker-images: false
google-cloud-sdk: false
heroku: false
llvm: false
opt: false
powershell: false
python: false
ruby: false
rust: false
tool-cache: false
usrlocal: false
usrmisc: false
varcache: false
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # tag=v7.0.1
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # tag=v7.0.0
with:
go-version: v1.26.4
- name: Delete non-semver tags
run: 'git tag -d $(git tag -l | grep -v "^v")'
- name: Set LDFLAGS
run: echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV
- name: Run GoReleaser on tag
if: github.event_name != 'pull_request'
uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # tag=v7.2.3
with:
distribution: goreleaser
version: "~> v2"
args: release --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}
- name: Run GoReleaser on pull request
if: github.event_name == 'pull_request'
uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # tag=v7.2.3
with:
distribution: goreleaser
version: "~> v2"
args: release --timeout 60m --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # tag=v7.0.1
if: ${{ always() }}
with:
name: binaries
path: dist/*.tar.gz