File tree Expand file tree Collapse file tree 3 files changed +46
-11
lines changed Expand file tree Collapse file tree 3 files changed +46
-11
lines changed Original file line number Diff line number Diff line change
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
+ - name : Generate a token
15
+ id : generate_token
16
+ uses : actions/create-github-app-token@v1
17
+ with :
18
+ app-id : ${{ secrets.APP_ID }}
19
+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
20
+ owner : ' openai'
21
+ repositories : ' openai-node,openai-deno-build'
22
+
23
+ - uses : actions/checkout@v3
24
+
25
+ - name : Set up Node
26
+ uses : actions/setup-node@v3
27
+ with :
28
+ node-version : ' 16'
29
+
30
+ - name : Set up Deno
31
+ uses : denoland/setup-deno@v1
32
+ with :
33
+ deno-version : v1.x
34
+
35
+ - name : Install dependencies
36
+ run : |
37
+ yarn install
38
+
39
+ - name : Publish to Deno
40
+ run : |
41
+ bash ./scripts/git-publish-deno.sh
42
+ env :
43
+ DENO_PUSH_REMOTE_URL : https://username:${{ steps.generate_token.outputs.token }}@github.com/openai/openai-deno-build.git
44
+ DENO_PUSH_BRANCH : main
Original file line number Diff line number Diff line change 8
8
publish :
9
9
name : publish
10
10
runs-on : ubuntu-latest
11
+ environment : publish
11
12
12
13
steps :
13
14
- uses : actions/checkout@v3
17
18
with :
18
19
node-version : ' 16'
19
20
20
- - name : Set up Deno
21
- uses : denoland/setup-deno@v1
22
- with :
23
- deno-version : v1.x
24
-
25
21
- name : Install dependencies
26
22
run : |
27
23
yarn install
31
27
bash ./bin/publish-npm
32
28
env :
33
29
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 : {}
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -exuo pipefail
3
3
4
- # This script pushes the contents of the `deno`` directory to the `deno` branch,
4
+ # This script pushes the contents of the `deno` directory to the `deno` branch,
5
5
# and creates a `vx.x.x-deno` tag, so that Deno users can
6
6
# import OpenAI from "https://raw.githubusercontent.com/openai/openai-node/vx.x.x-deno/mod.ts"
7
7
You can’t perform that action at this time.
0 commit comments