@@ -2,9 +2,9 @@ name: Release
2
2
3
3
on :
4
4
schedule :
5
- # Runs at 2 :00 AM UTC on every Saturday
5
+ # Runs at 8 :00 AM UTC on every Saturday
6
6
# We'll check below if it's the first Saturday of the month, and fail if not
7
- - cron : ' 0 2 * * 6'
7
+ - cron : ' 0 8 * * 6'
8
8
# Allow manual triggering of the workflow
9
9
workflow_dispatch :
10
10
inputs :
22
22
required : true
23
23
default : false
24
24
25
+ defaults :
26
+ run :
27
+ shell : bash
28
+
25
29
jobs :
26
30
check-and-release :
27
31
runs-on : ubuntu-latest
28
32
steps :
33
+ - name : Check for correct repository
34
+ if : ${{ github.event_name != 'workflow_dispatch' && github.repository != 'stefanhaller/lazygit' }}
35
+ run : |
36
+ echo "Should only run in the stefanhaller/lazygit repository"
37
+ exit 1
38
+
29
39
- name : Check for first Saturday of the month
30
40
if : ${{ github.event_name != 'workflow_dispatch' }}
31
41
run : |
37
47
- name : Checkout Code
38
48
uses : actions/checkout@v4
39
49
with :
50
+ repository : jesseduffield/lazygit
51
+ token : ${{ secrets.LAZYGIT_RELEASE_PAT }}
40
52
fetch-depth : 0
41
53
42
54
- name : Get Latest Tag
85
97
exit 1
86
98
fi
87
99
env :
88
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
100
+ GITHUB_TOKEN : ${{ secrets.LAZYGIT_RELEASE_PAT }}
89
101
90
102
- name : Calculate next version
91
103
run : |
@@ -119,28 +131,28 @@ jobs:
119
131
run : |
120
132
git config user.name "github-actions[bot]"
121
133
git config user.email "github-actions[bot]@users.noreply.github.com"
122
- git tag ${{ env.new_tag }}
134
+ git tag ${{ env.new_tag }} -a -m "Release ${{ env.new_tag }}"
123
135
git push origin ${{ env.new_tag }}
124
136
env :
125
- GITHUB_TOKEN : ${{ secrets.GITHUB_API_TOKEN }}
137
+ GITHUB_TOKEN : ${{ secrets.LAZYGIT_RELEASE_PAT }}
126
138
127
139
- name : Setup Go
128
140
uses : actions/setup-go@v5
129
141
with :
130
142
go-version : 1.24.x
131
143
132
144
- name : Run goreleaser
133
- uses : goreleaser/goreleaser-action@v4
145
+ uses : goreleaser/goreleaser-action@v6
134
146
with :
135
147
distribution : goreleaser
136
- version : v1.17.2
148
+ version : v2
137
149
args : release --clean
138
150
env :
139
- GITHUB_TOKEN : ${{secrets.GITHUB_API_TOKEN }}
151
+ GITHUB_TOKEN : ${{secrets.LAZYGIT_RELEASE_PAT }}
140
152
141
153
- name : Bump Homebrew formula
142
154
uses : dawidd6/action-homebrew-bump-formula@v3
143
155
with :
144
- token : ${{secrets.GITHUB_API_TOKEN }}
156
+ token : ${{secrets.LAZYGIT_RELEASE_PAT }}
145
157
formula : lazygit
146
158
tag : ${{env.new_tag}}
0 commit comments