Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .agents/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ Things that span files:
Push a `v*` tag matching the `[workspace.package]` version in the root `Cargo.toml`; `release-github.yml` builds five targets (macOS arm64/x64, Linux arm64/x64, Windows x64) and attaches archives plus `checksums.txt`.

`release-npm.yml` ("Code Release npm") runs on the same tag and publishes `@ondeinference/onde-code` (a Node launcher in `packaging/npm/onde-code`) plus five platform packages, `@ondeinference/onde-code-{darwin-arm64,darwin-x64,linux-x64,linux-arm64,windows-x64}`. Auth is npm Trusted Publishing; npm authenticates with OIDC, not a token. Trusted Publishers are configured per package (all six point at `release-npm.yml`), so a new package needs one before its first CI publish; run `packaging/npm/scripts/setup-trusted-publishing.sh` to create and attach them. Verify with `npm view @ondeinference/onde-code version`.

**winget:** `release-winget.yml` files the Package Request issue with `WINGET_ISSUE_TOKEN` (`public_repo`), then opens the manifest PR with `WINGET_PR_TOKEN`, a classic PAT with `public_repo`, `read:org`, `read:discussion`, and `workflow`. The first three cover forking and the `gh pr edit` GraphQL query. `workflow` is there because wingetcreate fast-forwards the token owner's fork before it branches, and GitHub refuses that sync once an upstream commit changes a file under `.github/workflows`. "The forked repository could not be synced with the upstream commits" can mean the PAT lacks `workflow`, or that the fork has simply drifted too far behind upstream; add the scope, or sync the fork by hand and rerun.
8 changes: 6 additions & 2 deletions .github/workflows/release-winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ jobs:
# calls `gh pr edit`, whose GraphQL query resolves
# org/team and discussion fields and fails with a
# scope error without them.
# WINGET_PR_TOKEN also needs workflow: wingetcreate fast-forwards the token
# owner's fork before it branches, and GitHub refuses that sync when an
# upstream commit changed a file under .github/workflows (seen on sigit
# v1.7.10).
- name: File the winget Package Request issue
id: issue
shell: bash
Expand Down Expand Up @@ -206,7 +210,7 @@ jobs:
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_PR_TOKEN }}
run: |
if (-not $env:WINGET_CREATE_GITHUB_TOKEN) {
Write-Error "WINGET_PR_TOKEN is not set. It needs a PAT with public_repo, read:org, and read:discussion scopes so wingetcreate can fork microsoft/winget-pkgs and open the manifest PR, and gh can edit the PR body."
Write-Error "WINGET_PR_TOKEN is not set. It needs a PAT with public_repo, read:org, read:discussion, and workflow scopes so wingetcreate can sync its fork of microsoft/winget-pkgs and open the manifest PR, and gh can edit the PR body."
}

$version = "${{ steps.release.outputs.version }}"
Expand Down Expand Up @@ -240,7 +244,7 @@ jobs:
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_PR_TOKEN }}
run: |
if (-not $env:WINGET_CREATE_GITHUB_TOKEN) {
Write-Error "WINGET_PR_TOKEN is not set. It needs a PAT with public_repo, read:org, and read:discussion scopes so wingetcreate can fork microsoft/winget-pkgs and open the manifest PR, and gh can edit the PR body."
Write-Error "WINGET_PR_TOKEN is not set. It needs a PAT with public_repo, read:org, read:discussion, and workflow scopes so wingetcreate can sync its fork of microsoft/winget-pkgs and open the manifest PR, and gh can edit the PR body."
}

$tag = "${{ steps.release.outputs.tag }}"
Expand Down
Loading