Skip to content

Commit

Permalink
Inject token
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Nov 22, 2023
1 parent c1e81f3 commit a748a65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Download draft binaries
uses: actions/github-script@v7
with:
script: |
const { script } = await import('${{ github.workspace }}/scripts/actions/download-draft-bins.js')
const id = "${{ needs.create-release.outputs.release_id }}";
await script({ github, context }, id);
env:
# TODO: is this even needed or does it auto inject?
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Presign
run: |
ls -hal binaries
Expand Down
2 changes: 2 additions & 0 deletions scripts/actions/download-draft-bins.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import fs from "fs";

const { GITHUB_TOKEN } = process.env;

async function downloadFile(url, filepath = "./download") {
const response = await fetch(url, {
headers: {
Expand Down

0 comments on commit a748a65

Please sign in to comment.