From b3ae79aa54b76e9f90a8f8efe625db9af3d9e4db Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Thu, 1 Dec 2022 15:59:02 -0500 Subject: [PATCH] jeez, i'm dumb --- .github/workflows/build.yml | 2 ++ scripts/bottle.ts | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31e5711e..b6eee13c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -210,12 +210,14 @@ jobs: env: COMPRESSION: xz GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - run: scripts/bottle.ts ${{ needs.build.outputs.built }} id: bottle-gz env: COMPRESSION: gz GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - name: upload bottles id: upload diff --git a/scripts/bottle.ts b/scripts/bottle.ts index 132ff9ac..6e629c41 100755 --- a/scripts/bottle.ts +++ b/scripts/bottle.ts @@ -19,7 +19,7 @@ args: import { Installation } from "types" import { useCellar, usePrefix, useFlags, useCache } from "hooks" -import { backticks, run } from "utils" +import { backticks, panic, run } from "utils" import { crypto } from "deno/crypto/mod.ts" import { encode } from "deno/encoding/hex.ts" import { encode as base64Encode } from "deno/encoding/base64.ts" @@ -36,9 +36,8 @@ if (import.meta.main) { useFlags() const compression = Deno.env.get("COMPRESSION") == 'xz' ? 'xz' : 'gz' - const gpgKey = Deno.env.get("GPG_KEY_ID") - const gpgPassphrase = Deno.env.get("GPG_PASSPHRASE") - if (!gpgKey || !gpgPassphrase) throw new Error("missing GPG_KEY_ID") + const gpgKey = Deno.env.get("GPG_KEY_ID") ?? panic("missing GPG_KEY_ID") + const gpgPassphrase = Deno.env.get("GPG_PASSPHRASE") ?? panic("missing GPG_PASSPHRASE") const checksums: string[] = [] const signatures: string[] = [] const bottles: Path[] = []