Skip to content

Commit

Permalink
Update script
Browse files Browse the repository at this point in the history
  • Loading branch information
athyuttamre committed Nov 19, 2023
1 parent 7659ab3 commit 4346ba6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/publish-deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ jobs:
environment: publish

steps:
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: 'openai'
repositories: 'openai-node,openai-deno-build'

- uses: actions/checkout@v3

- name: Set up Node
Expand All @@ -27,17 +36,9 @@ jobs:
run: |
yarn install
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Publish to Deno
run: |
bash ./scripts/git-publish-deno.sh
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
DENO_PUSH_REMOTE_URL: [email protected]:openai/openai-deno-build.git
DENO_PUSH_REMOTE_URL: https://username:${{ steps.generate_token.outputs.token }}@github.com/openai/openai-deno-build.git
DENO_PUSH_BRANCH: main
2 changes: 1 addition & 1 deletion scripts/git-publish-deno.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -exuo pipefail

# This script pushes the contents of the `deno`` directory to the `deno` branch,
# This script pushes the contents of the `deno` directory to the `deno` branch,
# and creates a `vx.x.x-deno` tag, so that Deno users can
# import OpenAI from "https://raw.githubusercontent.com/openai/openai-node/vx.x.x-deno/mod.ts"

Expand Down

0 comments on commit 4346ba6

Please sign in to comment.