Skip to content

Commit e65dc64

Browse files
committed
Update GitHub actions workflow for improved release process
- Add triggers for Homebrew release and Winget build in the workflow - Update the upload binary step to include a matrix of targets in the release workflow
1 parent 436a912 commit e65dc64

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,29 @@ jobs:
5050
ref: refs/tags/${{ inputs.publish-tag }}
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
- name: Trigger homebrew release
54-
run: gh workflow run bump.yml --repo zurawiki/homebrew-brews || true
55-
env:
56-
GITHUB_TOKEN: ${{ secrets.HOMEBREW_RELEASE_GH_TOKEN }}
57-
- name: Trigger Winget Build
58-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
59-
with:
60-
github-token: ${{ secrets.GITHUB_TOKEN }}
61-
script: |
62-
await github.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', {
63-
owner: 'zurawiki',
64-
repo: '${{ github.event.repository.name }}',
65-
workflow_id: 'winget.yml',
66-
ref: 'main',
67-
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', '')}
68-
})
53+
54+
trigger-homebrew:
55+
name: Trigger Homebrew release
56+
needs:
57+
- create-release
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Trigger homebrew release
61+
run: gh workflow run bump.yml --repo zurawiki/homebrew-brews || true
62+
env:
63+
GH_TOKEN: ${{ secrets.HOMEBREW_RELEASE_GH_TOKEN }}
64+
- name: Trigger Winget Build
65+
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
66+
with:
67+
github-token: ${{ secrets.GITHUB_TOKEN }}
68+
script: |
69+
await github.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', {
70+
owner: 'zurawiki',
71+
repo: '${{ github.event.repository.name }}',
72+
workflow_id: 'winget.yml',
73+
ref: 'main',
74+
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', '')}
75+
})
6976
7077
upload-binary:
7178
name: ${{ matrix.target }}

0 commit comments

Comments
 (0)