@@ -200,8 +200,7 @@ jobs:
200200 - run : go test -count=1 -shuffle=on ./...
201201
202202 dispatch :
203- # TODO!
204- # if: github.event_name == 'push' && github.ref_type == 'tag'
203+ if : github.event_name == 'push' && github.ref_type == 'tag'
205204 needs :
206205 - pest
207206 - e2e
@@ -222,3 +221,63 @@ jobs:
222221 VERSION : ${{ github.ref_name }}
223222 RUN_ID : ${{ github.run_id }}
224223 GH_TOKEN : ${{ github.token }}
224+
225+
226+ goreleaser :
227+ runs-on : ubuntu-latest
228+ needs :
229+ - pest
230+ - e2e
231+ permissions :
232+ # For GoReleaser
233+ contents : write
234+ # For actions/attest
235+ id-token : write
236+ attestations : write
237+ artifact-metadata : write
238+ steps :
239+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
240+ with :
241+ fetch-depth : 0
242+ persist-credentials : false
243+ - uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
244+ with :
245+ go-version : stable
246+
247+ - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
248+ with :
249+ name : php-matrix_linux_arm64
250+ path : out/linux_arm64
251+ - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
252+ with :
253+ name : php-matrix_linux_amd64
254+ path : out/linux_amd64
255+ - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
256+ with :
257+ name : php-matrix_darwin_arm64
258+ path : out/darwin_arm64
259+ - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
260+ with :
261+ name : php-matrix_darwin_amd64
262+ path : out/darwin_amd64
263+
264+
265+ # TODO!
266+ - run : ls -laR out
267+
268+ - uses : actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
269+ id : app-token
270+ with :
271+ client-id : ${{ vars.TASTENDRUCK_CLIENT_ID }}
272+ private-key : ${{ secrets.TASTENDRUCK_PRIVATE_KEY }}
273+ owner : ${{ github.repository_owner }}
274+ repositories : homebrew-tap
275+ permission-contents : write
276+
277+ - uses : goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
278+ with :
279+ version : " ~> v2"
280+ args : release --clean --snapshot
281+ env :
282+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
283+ GORELEASER_HOMEBREW_GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
0 commit comments