Skip to content

feat(ci): Add automated Winget publishing to release workflow #39

@rianjs

Description

@rianjs

Summary

Extend the release workflow to automatically submit PRs to microsoft/winget-pkgs, plus add validation and manual retry workflows.

Changes

  • Add winget job to .github/workflows/release.yml
  • Create .github/workflows/winget-publish.yml for manual publishing
  • Create .github/workflows/test-winget.yml for manifest validation on PRs
  • Document WINGET_GITHUB_TOKEN secret requirement

Workflow logic

  1. Wait for goreleaser job to complete
  2. Download wingetcreate tool
  3. Check if manifest already exists in microsoft/winget-pkgs
  4. If exists: use wingetcreate update command
  5. If new: process templates and use wingetcreate submit
  6. Use .NET regex for sequential checksum replacement (PowerShell -replace doesn't support count parameter)

Files to modify/create

  • .github/workflows/release.yml (add winget job)
  • .github/workflows/winget-publish.yml (new)
  • .github/workflows/test-winget.yml (new)

Required secrets

Secret How to Obtain
WINGET_GITHUB_TOKEN GitHub PAT with public_repo scope

Acceptance criteria

  • Release workflow includes Winget publishing job
  • Test workflow validates manifests on PRs touching packaging/winget/**
  • Manual workflow allows re-publishing specific versions
  • PR successfully created on microsoft/winget-pkgs

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions