Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump package version automatically when gptscript is released #50

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update GPTScript Version
on:
repository_dispatch:
types: release

jobs:
update-gptscript-dep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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[0-9.]*"/version: "${{ github.event.client_payload.tag }}"/' scripts/install-binary.js
- uses: actions/setup-node@v4
with:
node-version: 21
- name: Update Lock
run: npm i --package-lock-only
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automated GPTScript Version Update
file_pattern: 'package*.json src/install-binary.js'
tag-release:
needs: update-gptscript-dep
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ github.event.client_payload.tag }}
tag_prefix: ""
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}