Skip to content

Commit

Permalink
Add WinGet install steps and automation
Browse files Browse the repository at this point in the history
  • Loading branch information
sirredbeard committed Feb 21, 2024
1 parent 572729c commit c6fef46
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
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

0 comments on commit c6fef46

Please sign in to comment.