Skip to content

Commit b852416

Browse files
committed
chore: add back dispatch jobs
Signed-off-by: Taylor Price <[email protected]>
1 parent e9ff82f commit b852416

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/dispatch.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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: Install jq
14+
uses: dcarbone/[email protected]
15+
- name: Update GPTScript Version
16+
run: |
17+
jq '.version = "${{ github.event.client_payload.tag }}"' package.json > temp.json && mv temp.json package.json
18+
sed -i 's/version: "v.*"/version: "${{ github.event.client_payload.tag }}"/' scripts/install-binary.js
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 21
22+
- name: Install
23+
run: npm i
24+
- uses: stefanzweifel/git-auto-commit-action@v5
25+
with:
26+
commit_message: Automated GPTScript Version Update
27+
file_pattern: 'package*.json scripts/install-binary.js'
28+
tagging_message: ${{ github.event.client_payload.tag }}
29+
- name: Create a GitHub release
30+
uses: ncipollo/release-action@v1
31+
with:
32+
tag: ${{ github.event.client_payload.tag }}
33+
name: Release ${{ github.event.client_payload.tag }}
34+
generateReleaseNotes: true
35+
prerelease: ${{ contains(github.event.client_payload.tag, '-rc') }}

0 commit comments

Comments
 (0)