Skip to content

Commit c6fef46

Browse files
committed
Add WinGet install steps and automation
1 parent 572729c commit c6fef46

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.github/workflows/release.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,18 @@ jobs:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
GH_PROJECT_TOKEN: ${{ secrets.GH_PROJECT_TOKEN }}
3333
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
34+
winget-release:
35+
needs: release-tag
36+
runs-on: windows-latest
37+
steps:
38+
- name: Install winget-create
39+
run: |
40+
Invoke-WebRequest -Uri 'https://aka.ms/wingetcreate/latest' -OutFile 'wingetcreate.exe'
41+
- name: Create WinGet Package Update Pull Request
42+
run: |
43+
$latestRelease = Invoke-RestMethod -Uri https://api.github.com/repos/gptscript-ai/gptscript/releases/latest
44+
$url = $latestRelease.assets | Where-Object { $_.name -eq ("gptscript-" + $latestRelease.tag_name + "-windows-amd64.zip") } | Select-Object -ExpandProperty browser_download_url
45+
./wingetcreate.exe update --submit --token "${{ secrets.GITHUB_TOKEN }}" --urls $url --version "${{ github.event.release.tag_name }}" gptscript-ai.gptscript
46+
env:
47+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ brew install gptscript-ai/tap/gptscript
4747
curl https://get.gptscript.ai/install.sh | sh
4848
```
4949

50+
#### WinGet (Windows)
51+
52+
```shell
53+
winget install gptscript-ai.gptscript
54+
```
55+
5056
#### Manually
5157

5258
Download and install the archive for your platform and architecture from the [releases page](https://github.com/gptscript-ai/gptscript/releases).

0 commit comments

Comments
 (0)