Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/winget-releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Publish release to WinGet
on:
release:
types: [released]
Comment on lines +2 to +4
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Race condition: assets may not be uploaded when this workflow runs.

The released event fires at approximately the same time as the published event. However, release.yml (triggered by published) builds and uploads release assets, which takes significant time. This workflow may start before assets are available, causing winget-releaser to fail.

Consider one of these alternatives:

  1. Use workflow_run trigger to run after release.yml completes:
on:
  workflow_run:
    workflows: ["Publish Release"]
    types: [completed]

Then filter for success and extract the release tag from the triggering workflow.

  1. Add this as a job in release.yml that depends on publish-release-assets:
publish-to-winget:
  name: Publish to WinGet
  needs: publish-release-assets
  runs-on: windows-latest
  steps:
    - uses: vedantmgoyal9/winget-releaser@v2
      with:
        identifier: Webadderall.Recordly
        installers-regex: 'windows\-x64\.exe'
        token: ${{ secrets.WINGET_ACC_TOKEN }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/winget-releaser.yml around lines 2 - 4, The workflow
triggers on the `release` event which can race with `release.yml` asset uploads;
switch to a post-publish trigger or move the job to the release workflow: either
change the `on:` block to use `workflow_run` for the "Publish Release" workflow
(types: [completed]) and ensure you filter for success and extract the release
tag from the triggering run, or add a `publish-to-winget` job inside
`release.yml` that declares `needs: publish-release-assets` so the winget step
(the vedantmgoyal9/winget-releaser invocation) only runs after assets are
uploaded.

jobs:
publish:
runs-on: windows-latest
steps:
- uses: vedantmgoyal9/winget-releaser@latest
with:
identifier: Webadderall.Recordly
installers-regex: 'windows\-x64\.exe'
token: ${{ secrets.WINGET_ACC_TOKEN }}