diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index c5357540..996b6423 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -749,41 +749,27 @@ jobs: } } - # Update Scoop bucket (only stable releases from public repo) - update-scoop: - name: Update Scoop Bucket - runs-on: ubuntu-latest + # Update WinGet package at microsoft/winget-pkgs (only stable releases from public repo) + # Uses Microsoft's official wingetcreate tool (https://github.com/microsoft/winget-create) + # to generate updated manifests and open a PR to microsoft/winget-pkgs. + # Requires WINGET_TOKEN secret: classic PAT with public_repo scope. + update-winget: + name: Update WinGet Package + runs-on: windows-latest needs: [build-and-test, build-and-validate-macos-intel, build-and-validate-macos-arm, integration-tests, release-validation, create-release, publish-pypi] - # TODO: Enable once downstream repository and secrets are configured (see #88) - if: false && github.ref_type == 'tag' && needs.create-release.outputs.is_private_repo != 'true' && needs.create-release.outputs.is_prerelease != 'true' + if: github.ref_type == 'tag' && needs.create-release.outputs.is_private_repo != 'true' && needs.create-release.outputs.is_prerelease != 'true' permissions: contents: read steps: - - name: Extract Windows checksum from GitHub release - id: checksums + - name: Update WinGet manifest run: | - RELEASE_TAG="${{ github.ref_name }}" - curl -L -o apm-windows-x86_64.zip.sha256 \ - "https://github.com/${{ github.repository }}/releases/download/$RELEASE_TAG/apm-windows-x86_64.zip.sha256" - WINDOWS_X86_64_SHA=$(cat apm-windows-x86_64.zip.sha256 | cut -d' ' -f1) - echo "windows-x86_64-sha=$WINDOWS_X86_64_SHA" >> $GITHUB_OUTPUT - echo "Windows x86_64 SHA: $WINDOWS_X86_64_SHA" - - - name: Trigger Scoop bucket repository update - uses: peter-evans/repository-dispatch@v3 - with: - token: ${{ secrets.GH_PKG_PAT }} - repository: microsoft/scoop-apm - event-type: bucket-update - client-payload: | - { - "release": { - "version": "${{ github.ref_name }}", - "tag": "${{ github.ref_name }}", - "repository": "${{ github.repository }}" - }, - "checksums": { - "windows_x86_64": "${{ steps.checksums.outputs.windows-x86_64-sha }}" - } - } + $version = "${{ github.ref_name }}" -replace '^v', '' + $url = "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/apm-windows-x86_64.zip" + Invoke-WebRequest -Uri "https://aka.ms/wingetcreate/latest" -OutFile wingetcreate.exe + .\wingetcreate.exe update Microsoft.APM ` + --version $version ` + --urls $url ` + --submit ` + --token ${{ secrets.WINGET_TOKEN }} + shell: pwsh diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c38126a..5739f029 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `apm install --target` flag to force deployment to a specific target (copilot, claude, cursor, opencode, all) (#456) +- WinGet installation method for Windows: `winget install Microsoft.APM` (#88) ### Fixed diff --git a/README.md b/README.md index 6d1f5b19..b3e6d03f 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,8 @@ pip install apm-cli #### Windows ```powershell -# Scoop -scoop bucket add apm https://github.com/microsoft/scoop-apm -scoop install apm +# WinGet +winget install Microsoft.APM # pip pip install apm-cli ``` diff --git a/docs/src/content/docs/getting-started/installation.md b/docs/src/content/docs/getting-started/installation.md index f40da1fa..025dd891 100644 --- a/docs/src/content/docs/getting-started/installation.md +++ b/docs/src/content/docs/getting-started/installation.md @@ -35,11 +35,10 @@ The installer automatically detects your platform (macOS/Linux/Windows, Intel/AR brew install microsoft/apm/apm ``` -**Scoop (Windows):** +**WinGet (Windows):** ```powershell -scoop bucket add apm https://github.com/microsoft/scoop-apm -scoop install apm +winget install Microsoft.APM ``` ## pip install diff --git a/docs/src/content/docs/getting-started/quick-start.md b/docs/src/content/docs/getting-started/quick-start.md index 1fa009f6..58626b7a 100644 --- a/docs/src/content/docs/getting-started/quick-start.md +++ b/docs/src/content/docs/getting-started/quick-start.md @@ -27,7 +27,7 @@ Verify it worked: apm --version ``` -For Homebrew (macOS/Linux), Scoop (Windows), pip, or manual install, see the [Installation guide](../installation/). +For Homebrew (macOS/Linux), WinGet (Windows), pip, or manual install, see the [Installation guide](../installation/). ## Start a project