Skip to content

Commit 0c7b98a

Browse files
claudeben-edna
authored andcommitted
fix: use dfetch-org/winget-pkgs org fork (created manually)
Replace the dynamic fork-user resolution with a hardcoded fork-user: dfetch-org now that the org fork of microsoft/winget-pkgs has been created manually. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012NwjWMaDcFgUU1UNpQFfY4
1 parent 1dd30bb commit 0c7b98a

1 file changed

Lines changed: 6 additions & 17 deletions

File tree

.github/workflows/winget-publish.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,26 @@ jobs:
4444
index.crates.io:443
4545
static.crates.io:443
4646
47-
- name: Resolve WinGet fork owner from token
48-
# komac forks microsoft/winget-pkgs into the fork-owner's account and
49-
# opens a PR from there. Fine-grained PATs scoped to an *organisation*
50-
# cannot create org-level forks, so we always fork into the *personal*
51-
# account that owns the token (typically the maintainer's account).
52-
id: winget-fork-owner
53-
run: |
54-
OWNER=$(curl -sf \
55-
-H "Authorization: Bearer ${{ secrets.WINGET_TOKEN }}" \
56-
https://api.github.com/user \
57-
| python3 -c "import sys, json; print(json.load(sys.stdin)['login'])")
58-
echo "fork-user=${OWNER}" >> "$GITHUB_OUTPUT"
59-
6047
- name: Publish to WinGet
6148
# Requires WINGET_TOKEN secret in the 'winget' environment.
6249
#
6350
# Setup — create a fine-grained PAT:
6451
# 1. GitHub → Settings → Developer settings → Personal access tokens
6552
# → Fine-grained tokens → Generate new token
66-
# 2. Resource owner: YOUR PERSONAL GitHub account (not the org —
67-
# org-scoped tokens cannot create the required winget-pkgs fork)
53+
# 2. Resource owner: DFetch-org
6854
# 3. Repository access: All repositories
69-
# (needed to fork microsoft/winget-pkgs and push the manifest branch)
55+
# (needed to push the manifest branch to dfetch-org/winget-pkgs)
7056
# 4. Permissions:
7157
# Contents → Read and write
7258
# Pull requests → Read and write
7359
# 5. Store the token as secret WINGET_TOKEN in:
7460
# Repo → Settings → Environments → winget → Environment secrets
61+
#
62+
# Prerequisites: dfetch-org/winget-pkgs must exist as a fork of
63+
# microsoft/winget-pkgs (create it once manually on GitHub).
7564
uses: vedantmgoyal9/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e # v2
7665
with:
7766
identifier: DFetch-org.DFetch
7867
release-tag: ${{ github.event.release.tag_name || inputs.release-tag }}
7968
token: ${{ secrets.WINGET_TOKEN }}
80-
fork-user: ${{ steps.winget-fork-owner.outputs.fork-user }}
69+
fork-user: dfetch-org

0 commit comments

Comments
 (0)