From a748a659e6087892986d38c564567c11324ee0a6 Mon Sep 17 00:00:00 2001 From: Sean Boult <996134+Hacksore@users.noreply.github.com> Date: Wed, 22 Nov 2023 16:32:20 -0600 Subject: [PATCH] Inject token --- .github/workflows/release.yaml | 6 +++--- scripts/actions/download-draft-bins.js | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b1b11c52..f64b073e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -83,9 +83,6 @@ 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: @@ -93,6 +90,9 @@ jobs: 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 diff --git a/scripts/actions/download-draft-bins.js b/scripts/actions/download-draft-bins.js index 54089c7f..91483ead 100644 --- a/scripts/actions/download-draft-bins.js +++ b/scripts/actions/download-draft-bins.js @@ -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: {