Skip to content

Commit 4346ba6

Browse files
committed
Update script
1 parent 7659ab3 commit 4346ba6

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/publish-deno.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ jobs:
1111
environment: publish
1212

1313
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+
1423
- uses: actions/checkout@v3
1524

1625
- name: Set up Node
@@ -27,17 +36,9 @@ jobs:
2736
run: |
2837
yarn install
2938
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-
3739
- name: Publish to Deno
3840
run: |
3941
bash ./scripts/git-publish-deno.sh
4042
env:
41-
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
42-
DENO_PUSH_REMOTE_URL: [email protected]:openai/openai-deno-build.git
43+
DENO_PUSH_REMOTE_URL: https://username:${{ steps.generate_token.outputs.token }}@github.com/openai/openai-deno-build.git
4344
DENO_PUSH_BRANCH: main

scripts/git-publish-deno.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -exuo pipefail
33

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,
55
# and creates a `vx.x.x-deno` tag, so that Deno users can
66
# import OpenAI from "https://raw.githubusercontent.com/openai/openai-node/vx.x.x-deno/mod.ts"
77

0 commit comments

Comments
 (0)