diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6ea47e8f..f916fdab 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -37,7 +37,7 @@ jobs: args: release --clean --snapshot env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_PROJECT_TOKEN: ${{ secrets.GH_PROJECT_TOKEN }} + TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} - name: Upload to S3 uses: jakejarvis/s3-sync-action@v0.5.1 env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 883a479d..bf38499d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,15 +31,25 @@ jobs: # After the issue is resolved, this can be set to 1.22 go-version: "1.22.4" - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: v1.23.0 + version: v2.0.1 args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_PROJECT_TOKEN: ${{ secrets.GH_PROJECT_TOKEN }} + TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} GORELEASER_CURRENT_TAG: ${{ github.ref_name }} + homebrew-release: + needs: release-tag + if: "! contains(github.ref_name, '-rc')" + runs-on: ubuntu-latest + steps: + - name: Update Homebrew formula + uses: dawidd6/action-homebrew-bump-formula@v3 + with: + token: ${{secrets.BREW_GH_TOKEN}} + formula: gptscript winget-release: needs: release-tag if: "! contains(github.ref_name, '-rc')" diff --git a/.goreleaser.yml b/.goreleaser.yml index d76c2e2e..522e3b22 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,4 @@ +version: 2 dist: releases snapshot: name_template: '{{ trimprefix .Summary "v" }}' @@ -50,3 +51,17 @@ release: owner: gptscript-ai name: gptscript prerelease: auto + +brews: + - name: gptscript + description: "GPTScript CLI" + install: | + bin.install "gptscript" + generate_completions_from_executable(bin/"gptscript", "completion") + homepage: "https://github.com/gptscript-ai/gptscript" + skip_upload: false + directory: "Formula" + repository: + owner: gptscript-ai + name: homebrew-tap + token: "{{ .Env.TAP_GITHUB_TOKEN }}" diff --git a/docs/docs/01-overview.md b/docs/docs/01-overview.md index 5ba2e7d1..590dcf62 100644 --- a/docs/docs/01-overview.md +++ b/docs/docs/01-overview.md @@ -21,10 +21,21 @@ Here are some sample use cases of GPTScript: + ## Homebrew Tap +___ ```shell brew install gptscript gptscript github.com/gptscript-ai/llm-basics-demo ``` + ## Homebrew +___ +:::warning +The [formula in homebrew-core](https://github.com/Homebrew/homebrew-core/blob/master/Formula/g/gptscript.rb) might be slightly outdated. Use our homebrew tap to always get the latest updates. +::: + ``` + brew install gptscript + gptscript github.com/gptscript-ai/llm-basics-demo + ``` ```shell