Skip to content

Add WinGet install to README and WinGet package update automation #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2024
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
15 changes: 15 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,18 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PROJECT_TOKEN: ${{ secrets.GH_PROJECT_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
winget-release:
needs: release-tag
runs-on: windows-latest
steps:
- name: Install winget-create
run: |
Invoke-WebRequest -Uri 'https://aka.ms/wingetcreate/latest' -OutFile 'wingetcreate.exe'
- name: Create WinGet Package Update Pull Request
run: |
$latestRelease = Invoke-RestMethod -Uri https://api.github.com/repos/gptscript-ai/gptscript/releases/latest
$url = $latestRelease.assets | Where-Object { $_.name -eq ("gptscript-" + $latestRelease.tag_name + "-windows-amd64.zip") } | Select-Object -ExpandProperty browser_download_url
./wingetcreate.exe update --submit --token "${{ secrets.GITHUB_TOKEN }}" --urls $url --version "${{ github.event.release.tag_name }}" gptscript-ai.gptscript
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ brew install gptscript-ai/tap/gptscript
curl https://get.gptscript.ai/install.sh | sh
```

#### WinGet (Windows)

```shell
winget install gptscript-ai.gptscript
```

#### Manually

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