Skip to content

Commit 09dec27

Browse files
authored
Merge pull request #33 from gptscript-ai/dispatch
chore: add back dispatch jobs
2 parents 65fe72c + aadf56f commit 09dec27

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/dispatch.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
with:
12+
token: ${{ secrets.BOT_GH_TOKEN }}
13+
- name: Update GPTScript Version
14+
run: |
15+
TAG=${{ github.event.client_payload.tag }}
16+
VERSION="${TAG#v}"
17+
sed -i 's/version = ".*"/version = "'${VERSION}'"/' pyproject.toml
18+
sed -i 's/"version": "v.*"/"version": "'${TAG}'"/' gptscript/install.py
19+
sed -i 's/"version": "v.*"/"version": "'${TAG}'"/' scripts/package
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
- name: Install deps
24+
run: |
25+
pip install -r requirements.txt
26+
- uses: stefanzweifel/git-auto-commit-action@v5
27+
with:
28+
commit_message: Automated GPTScript Version Update
29+
file_pattern: 'pyproject.toml gptscript/install.py scripts/package'
30+
tagging_message: ${{ github.event.client_payload.tag }}
31+
- name: Create a GitHub release
32+
uses: ncipollo/release-action@v1
33+
with:
34+
tag: ${{ github.event.client_payload.tag }}
35+
name: Release ${{ github.event.client_payload.tag }}
36+
generateReleaseNotes: true
37+
prerelease: ${{ contains(github.event.client_payload.tag, '-rc') }}

0 commit comments

Comments
 (0)