-
Notifications
You must be signed in to change notification settings - Fork 1.1k
72 lines (64 loc) · 2.16 KB
/
release.yml
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
name: release
on:
push:
tags:
- v*.*.* # stable release like, v0.19.2
- v*.*.*-pre.* # pre release like, v0.19.0-pre.calendardate
workflow_dispatch:
jobs:
goreleaser:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run GoReleaser for stable release
uses: goreleaser/goreleaser-action@v5
if: (!contains(github.ref, 'pre'))
with:
version: v1.16.2
# You can pass flags to goreleaser via GORELEASER_ARGS
# --clean will save you deleting the dist dir
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate changelog for pre release
if: contains(github.ref, 'pre')
id: changelog
run: |
echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
gh api repos/$GITHUB_REPOSITORY/releases/generate-notes \
-f tag_name="${GITHUB_REF#refs/tags/}" \
-f target_commitish=main \
-q .body > tmp-CHANGELOG.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Run GoReleaser for pre-release
uses: goreleaser/goreleaser-action@v5
if: contains(github.ref, 'pre')
with:
version: v1.16.2
# You can pass flags to goreleaser via GORELEASER_ARGS
# --clean will save you deleting the dist dir
args: release --clean --release-notes=tmp-CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ steps.changelog.outputs.RELEASE_TAG }}
homebrew:
name: "Bump Homebrew formula"
runs-on: ubuntu-22.04
if: false
# if: (!contains(github.ref, 'pre'))
steps:
- uses: mislav/bump-homebrew-formula-action@v2
with:
# A PR will be sent to github.com/Homebrew/homebrew-core to update this formula:
formula-name: atlantis
commit-message: |
{{formulaName}} {{version}}
Created by https://github.com/mislav/bump-homebrew-formula-action
env:
COMMITTER_TOKEN: ${{ secrets.GITHUB_TOKEN }}