Skip to content

Commit 9880794

Browse files
committed
fix: deploy deno in a github workflow instead of postpublish step (#405)
1 parent f706a4c commit 9880794

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

.github/workflows/create-releases.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
with:
2727
node-version: '16'
2828

29+
- name: Set up Deno
30+
if: ${{ steps.release.outputs.releases_created }}
31+
uses: denoland/setup-deno@v1
32+
with:
33+
deno-version: v1.x
34+
2935
- name: Install dependencies
3036
if: ${{ steps.release.outputs.releases_created }}
3137
run: |
@@ -37,3 +43,9 @@ jobs:
3743
bash ./bin/publish-npm
3844
env:
3945
NPM_TOKEN: ${{ secrets.OPENAI_NPM_TOKEN || secrets.NPM_TOKEN }}
46+
47+
- name: Publish to Deno
48+
if: ${{ steps.release.outputs.releases_created }}
49+
run: |
50+
bash ./scripts/git-publish-deno.sh
51+
env: {}

.github/workflows/publish-npm.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ jobs:
1717
with:
1818
node-version: '16'
1919

20+
- name: Set up Deno
21+
uses: denoland/setup-deno@v1
22+
with:
23+
deno-version: v1.x
24+
2025
- name: Install dependencies
2126
run: |
2227
yarn install
@@ -26,3 +31,8 @@ jobs:
2631
bash ./bin/publish-npm
2732
env:
2833
NPM_TOKEN: ${{ secrets.OPENAI_NPM_TOKEN || secrets.NPM_TOKEN }}
34+
35+
- name: Publish to Deno
36+
run: |
37+
bash ./scripts/git-publish-deno.sh
38+
env: {}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@
8383
"format": "prettier --write --cache --cache-strategy metadata . !dist",
8484
"tsn": "ts-node -r tsconfig-paths/register",
8585
"lint": "eslint --ext ts,js .",
86-
"fix": "eslint --fix --ext ts,js .",
87-
"postpublish": "bash scripts/git-publish-deno.sh"
86+
"fix": "eslint --fix --ext ts,js ."
8887
},
8988
"dependencies": {
9089
"@types/node": "^18.11.18",

0 commit comments

Comments
 (0)