Skip to content

Commit 97a47fa

Browse files
authored
Merge pull request #22 from thedadams/sdk-rewrite
chore: rewrite SDK to have parity with other SDKs
2 parents 15e4822 + d842d50 commit 97a47fa

21 files changed

+1522
-532
lines changed

.github/workflows/dispatch.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Update GPTScript Version
2+
on:
3+
repository_dispatch:
4+
types: release
5+
6+
jobs:
7+
update-gptscript-dep:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Update GPTScript Version
12+
run: |
13+
TAG=${{ github.event.client_payload.tag }}
14+
echo "${TAG#v}" >> $VERSION
15+
sed -i 's/version = "[0-9.]*"/version = "'${VERSION}'"/' pyproject.toml
16+
sed -i 's/version: "v[0-9.]*"/version: ""/' gptscript/install.py
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
- name: Install deps
21+
run: |
22+
pip install -r requirements.txt
23+
- uses: stefanzweifel/git-auto-commit-action@v5
24+
with:
25+
commit_message: Automated GPTScript Version Update
26+
file_pattern: 'pyproject.toml gptscript/install.py'
27+
tag-release:
28+
needs: update-gptscript-dep
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Bump version and push tag
33+
id: tag_version
34+
uses: mathieudutour/[email protected]
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
custom_tag: ${{ github.event.client_payload.tag }}
38+
tag_prefix: ""
39+
- name: Create a GitHub release
40+
uses: ncipollo/release-action@v1
41+
with:
42+
tag: ${{ steps.tag_version.outputs.new_tag }}
43+
name: Release ${{ steps.tag_version.outputs.new_tag }}
44+
body: ${{ steps.tag_version.outputs.changelog }}

0 commit comments

Comments
 (0)