@@ -2,9 +2,9 @@ name: Release
22
33on :
44 schedule :
5- # Runs at 2 :00 AM UTC on every Saturday
5+ # Runs at 8 :00 AM UTC on every Saturday
66 # 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'
88 # Allow manual triggering of the workflow
99 workflow_dispatch :
1010 inputs :
2222 required : true
2323 default : false
2424
25+ defaults :
26+ run :
27+ shell : bash
28+
2529jobs :
2630 check-and-release :
2731 runs-on : ubuntu-latest
2832 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+
2939 - name : Check for first Saturday of the month
3040 if : ${{ github.event_name != 'workflow_dispatch' }}
3141 run : |
3747 - name : Checkout Code
3848 uses : actions/checkout@v4
3949 with :
50+ repository : jesseduffield/lazygit
51+ token : ${{ secrets.LAZYGIT_RELEASE_PAT }}
4052 fetch-depth : 0
4153
4254 - name : Get Latest Tag
8597 exit 1
8698 fi
8799 env :
88- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
100+ GITHUB_TOKEN : ${{ secrets.LAZYGIT_RELEASE_PAT }}
89101
90102 - name : Calculate next version
91103 run : |
@@ -119,28 +131,28 @@ jobs:
119131 run : |
120132 git config user.name "github-actions[bot]"
121133 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 }}"
123135 git push origin ${{ env.new_tag }}
124136 env :
125- GITHUB_TOKEN : ${{ secrets.GITHUB_API_TOKEN }}
137+ GITHUB_TOKEN : ${{ secrets.LAZYGIT_RELEASE_PAT }}
126138
127139 - name : Setup Go
128140 uses : actions/setup-go@v5
129141 with :
130142 go-version : 1.24.x
131143
132144 - name : Run goreleaser
133- uses : goreleaser/goreleaser-action@v4
145+ uses : goreleaser/goreleaser-action@v6
134146 with :
135147 distribution : goreleaser
136- version : v1.17.2
148+ version : v2
137149 args : release --clean
138150 env :
139- GITHUB_TOKEN : ${{secrets.GITHUB_API_TOKEN }}
151+ GITHUB_TOKEN : ${{secrets.LAZYGIT_RELEASE_PAT }}
140152
141153 - name : Bump Homebrew formula
142154 uses : dawidd6/action-homebrew-bump-formula@v3
143155 with :
144- token : ${{secrets.GITHUB_API_TOKEN }}
156+ token : ${{secrets.LAZYGIT_RELEASE_PAT }}
145157 formula : lazygit
146158 tag : ${{env.new_tag}}
0 commit comments