-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (34 loc) · 1.27 KB
/
dispatch.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Update GPTScript Version
on:
repository_dispatch:
types: release
jobs:
update-gptscript-dep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_GH_TOKEN }}
- name: Install jq
uses: dcarbone/[email protected]
- name: Update GPTScript Version
run: |
jq '.version = "${{ github.event.client_payload.tag }}"' package.json > temp.json && mv temp.json package.json
sed -i 's/version: "v.*"/version: "${{ github.event.client_payload.tag }}"/' scripts/install-binary.js
- uses: actions/setup-node@v4
with:
node-version: 21
- name: Install
run: npm i
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automated GPTScript Version Update
file_pattern: 'package*.json scripts/install-binary.js'
tagging_message: ${{ github.event.client_payload.tag }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.event.client_payload.tag }}
name: Release ${{ github.event.client_payload.tag }}
generateReleaseNotes: true
prerelease: ${{ contains(github.event.client_payload.tag, '-rc') }}