Skip to content

Commit

Permalink
chore: add publish workflow based on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
thedadams committed Apr 23, 2024
1 parent 0b26ac9 commit baddb88
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 28 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: release

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: 21
- name: Set package version
run: |
sed -i 's/ "version": "%VERSION%",/ "version": "${{ github.ref_name }}",/' package.json
- name : Install dependencies
run: npm install
- name: Publish release
run: npm run build && npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v4
with:
node-version: 21
Expand Down
24 changes: 0 additions & 24 deletions Makefile

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gptscript-ai/gptscript",
"version": "0.5.0",
"version": "%VERSION%",
"description": "Run gptscript in node.js",
"main": "lib/gptscript.js",
"repository": {
Expand Down

0 comments on commit baddb88

Please sign in to comment.