Skip to content

Commit 44a9767

Browse files
authored
Merge pull request #764 from github/devm33/winget-app
Update winget.yml to use app access token
2 parents 1170873 + 1a4d63b commit 44a9767

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/winget.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ jobs:
1515

1616
# winget-create is only supported on Windows
1717
runs-on: windows-latest
18-
19-
# winget-create will read the following environment variable to access the GitHub token needed for submitting a PR
20-
# See https://aka.ms/winget-create-token
21-
env:
22-
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_CREATE_GITHUB_TOKEN }}
2318

2419
steps:
20+
- name: Generate release app access token
21+
id: app-token
22+
uses: actions/create-github-app-token@v2
23+
with:
24+
app-id: ${{ secrets.COPILOT_CLI_RELEASE_APP_ID }}
25+
private-key: ${{ secrets.COPILOT_CLI_RELEASE_APP_PRIVATE_KEY }}
26+
2527
- name: Submit package using wingetcreate
28+
env:
29+
WINGET_CREATE_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
2630
run: |
2731
# Set the package ID based on the release info
2832
$packageId = if (${{ !github.event.release.prerelease }}) { "GitHub.Copilot" } else { "GitHub.Copilot.Prerelease" }

0 commit comments

Comments
 (0)