Skip to content

feat: add winget-releaser workflow for automatic WinGet releases#191

Open
octo-patch wants to merge 1 commit intowebadderall:mainfrom
octo-patch:feat/issue-177-winget-releaser
Open

feat: add winget-releaser workflow for automatic WinGet releases#191
octo-patch wants to merge 1 commit intowebadderall:mainfrom
octo-patch:feat/issue-177-winget-releaser

Conversation

@octo-patch
Copy link
Copy Markdown

Fixes #177

Problem

When a new Recordly release is published, the WinGet package (Webadderall.Recordly) needs to be manually updated in the microsoft/winget-pkgs repository. This is error-prone and slow.

Solution

Add a GitHub Actions workflow that automatically publishes new releases to WinGet using winget-releaser.

The workflow triggers on released events and uses the vedantmgoyal9/winget-releaser@latest action to push the new version to WinGet.

Setup Required

To activate this workflow, the repo maintainer needs to:

  1. Create a classic Personal Access Token (PAT) with public_repo scope at https://github.com/settings/tokens/new
  2. Add the token as a repository secret named WINGET_ACC_TOKEN
  3. Ensure there is a fork of microsoft/winget-pkgs under the same account

Testing

This is a CI workflow that only runs on released events. Once the WINGET_ACC_TOKEN secret is configured, it will automatically run on the next release.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "*" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow to automatically publish Recordly releases to the Windows Package Manager (WinGet). The workflow triggers on GitHub release events and uses the vedantmgoyal9/winget-releaser action to submit the package identifier Webadderall.Recordly with Windows x64 executable matching.

Changes

Cohort / File(s) Summary
WinGet Release Automation
.github/workflows/winget-releaser.yml
New GitHub Actions workflow that automatically publishes releases to WinGet when a GitHub release is created. Configured with package identifier Webadderall.Recordly, Windows x64 executable regex pattern, and authentication token from secrets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Our releases now hop straight to WinGet's door,
No manual updates forevermore!
With winget install, the users will cheer,
Recordly appears like magic so clear—
Automation makes this rabbit so glad! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately and concisely describes the main change: adding a GitHub Actions workflow for automated WinGet releases.
Description check ✅ Passed The PR description covers all essential sections including problem, solution, setup requirements, and testing notes; it follows the expected structure well.
Linked Issues check ✅ Passed The workflow implementation fully satisfies issue #177 requirements: uses winget-releaser action, triggers on released events, specifies correct identifier and token inputs.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the stated objective; only the winget-releaser workflow file was added with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/winget-releaser.yml (1)

9-9: Pin the action to a specific version instead of @latest.

Using @latest can cause unexpected breakage when the action is updated with breaking changes. Pin to a specific version like @v2 (the current stable release) for reproducibility.

Proposed fix
-      - uses: vedantmgoyal9/winget-releaser@latest
+      - uses: vedantmgoyal9/winget-releaser@v2
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/winget-releaser.yml at line 9, Replace the floating action
reference vedantmgoyal9/winget-releaser@latest with a pinned release (e.g.,
vedantmgoyal9/winget-releaser@v2 or a specific tag/sha) in the workflow so the
run uses a stable, reproducible version; update the uses entry in the workflow
step that currently contains vedantmgoyal9/winget-releaser@latest to the chosen
pinned tag.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/winget-releaser.yml:
- Around line 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.

---

Nitpick comments:
In @.github/workflows/winget-releaser.yml:
- Line 9: Replace the floating action reference
vedantmgoyal9/winget-releaser@latest with a pinned release (e.g.,
vedantmgoyal9/winget-releaser@v2 or a specific tag/sha) in the workflow so the
run uses a stable, reproducible version; update the uses entry in the workflow
step that currently contains vedantmgoyal9/winget-releaser@latest to the chosen
pinned tag.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6bbf295d-616f-4f5a-b278-4851cf1373fd

📥 Commits

Reviewing files that changed from the base of the PR and between 2692b28 and 6d57497.

📒 Files selected for processing (1)
  • .github/workflows/winget-releaser.yml

Comment on lines +2 to +4
on:
release:
types: [released]
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add winget-releaser github action for auto new releases to Webadderall.Recordly

1 participant