mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 14:55:37 +00:00
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:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user