Skip to content

Commit 7659ab3

Browse files
committed
[github] Add a manual workflow to publish openai-deno-build
1 parent 049ce6f commit 7659ab3

File tree

2 files changed

+44
-10
lines changed

2 files changed

+44
-10
lines changed

.github/workflows/publish-deno.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# workflow for re-running publishing to Deno in case it fails for some reason
2+
# you can run this workflow by navigating to https://www.github.com/openai/openai-node/actions/workflows/publish-deno.yml
3+
name: Publish Deno
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
publish:
9+
name: publish
10+
runs-on: ubuntu-latest
11+
environment: publish
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '16'
20+
21+
- name: Set up Deno
22+
uses: denoland/setup-deno@v1
23+
with:
24+
deno-version: v1.x
25+
26+
- name: Install dependencies
27+
run: |
28+
yarn install
29+
30+
- name: Generate a token
31+
id: generate_token
32+
uses: actions/create-github-app-token@v1
33+
with:
34+
app-id: ${{ secrets.APP_ID }}
35+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
36+
37+
- name: Publish to Deno
38+
run: |
39+
bash ./scripts/git-publish-deno.sh
40+
env:
41+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
42+
DENO_PUSH_REMOTE_URL: [email protected]:openai/openai-deno-build.git
43+
DENO_PUSH_BRANCH: main

.github/workflows/publish-npm.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
publish:
99
name: publish
1010
runs-on: ubuntu-latest
11+
environment: publish
1112

1213
steps:
1314
- uses: actions/checkout@v3
@@ -17,11 +18,6 @@ jobs:
1718
with:
1819
node-version: '16'
1920

20-
- name: Set up Deno
21-
uses: denoland/setup-deno@v1
22-
with:
23-
deno-version: v1.x
24-
2521
- name: Install dependencies
2622
run: |
2723
yarn install
@@ -31,8 +27,3 @@ jobs:
3127
bash ./bin/publish-npm
3228
env:
3329
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: {}

0 commit comments

Comments
 (0)