Skip to content

Commit

Permalink
fix: deploy deno in a github workflow instead of postpublish step (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Oct 27, 2023
1 parent 76c5c96 commit 3a6dba0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/create-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
with:
node-version: '16'

- name: Set up Deno
if: ${{ steps.release.outputs.releases_created }}
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Install dependencies
if: ${{ steps.release.outputs.releases_created }}
run: |
Expand All @@ -37,3 +43,9 @@ jobs:
bash ./bin/publish-npm
env:
NPM_TOKEN: ${{ secrets.OPENAI_NPM_TOKEN || secrets.NPM_TOKEN }}

- name: Publish to Deno
if: ${{ steps.release.outputs.releases_created }}
run: |
bash ./scripts/git-publish-deno.sh
env: {}
10 changes: 10 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
with:
node-version: '16'

- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Install dependencies
run: |
yarn install
Expand All @@ -26,3 +31,8 @@ jobs:
bash ./bin/publish-npm
env:
NPM_TOKEN: ${{ secrets.OPENAI_NPM_TOKEN || secrets.NPM_TOKEN }}

- name: Publish to Deno
run: |
bash ./scripts/git-publish-deno.sh
env: {}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@
"format": "prettier --write --cache --cache-strategy metadata . !dist",
"tsn": "ts-node -r tsconfig-paths/register",
"lint": "eslint --ext ts,js .",
"fix": "eslint --fix --ext ts,js .",
"postpublish": "bash scripts/git-publish-deno.sh"
"fix": "eslint --fix --ext ts,js ."
},
"dependencies": {
"@types/node": "^18.11.18",
Expand Down

0 comments on commit 3a6dba0

Please sign in to comment.