fix: winget workflow triggers after release build completes

Changed from release:released (races with build) to workflow_run
that waits for the Publish Release workflow to succeed first.
This commit is contained in:
webadderall
2026-04-09 16:52:55 +10:00
parent 919a29c61d
commit a56dbb4fca
+13 -2
View File
@@ -1,13 +1,24 @@
name: Publish release to WinGet
on:
release:
types: [released]
workflow_run:
workflows: ["Publish Release"]
types: [completed]
jobs:
publish:
runs-on: windows-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Get release tag
id: tag
shell: bash
run: |
TAG=$(gh api repos/${{ github.repository }}/releases/latest --jq '.tag_name')
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: vedantmgoyal9/winget-releaser@v2
with:
identifier: Webadderall.Recordly
installers-regex: 'windows\-x64\.exe'
version: ${{ steps.tag.outputs.tag }}
token: ${{ secrets.WINGET_ACC_TOKEN }}