From f77ab8a74b02dca51bce8661e71d667ce47acbbf Mon Sep 17 00:00:00 2001 From: Nikita Galaiko Date: Mon, 20 Feb 2023 16:17:02 +0100 Subject: [PATCH] Revert "hardcode release dir" This reverts commit 7467b96c2efe02e8a3642a4b9b6203ec7c572105. --- .github/workflows/publish.yaml | 1 + scripts/release.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index efc91744d..12d7a37ac 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -51,6 +51,7 @@ jobs: run: | ./scripts/release.sh \ --sign \ + --dist "./release" \ --version "${{ env.version }}" \ --tauri-private-key "${{ secrets.TAURI_PRIVATE_KEY }}" \ --tauri-key-password "${{ secrets.TAURI_KEY_PASSWORD }}" \ diff --git a/scripts/release.sh b/scripts/release.sh index bba168e00..ba28778a4 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -24,6 +24,7 @@ function help() { echo 1>&$to echo "flags:" 1>&$to echo " --version release version." 1>&$to + echo " --dist path to store artifacts in." 1>&$to echo " --tauri-private-key path or string of tauri updater private key." 1>&$to echo " --tauri-key-password password for tauri updater private key." 1>&$to echo " --apple-certificate base64 string of the .p12 certificate, exported from the keychain." 1>&$to @@ -75,7 +76,7 @@ function arch() { ARCH="$(arch)" OS="$(os)" -DIST="release" +DIST="release/$OS/$ARCH" function tauri() { pushd "$PWD/.." >/dev/null @@ -94,6 +95,11 @@ while [[ $# -gt 0 ]]; do shift shift ;; + --dist) + DIST="$2" + shift + shift + ;; --tauri-private-key) TAURI_PRIVATE_KEY="$2" shift @@ -165,7 +171,6 @@ info "building:" info " version: $VERSION" info " os: $OS" info " arch: $ARCH" -info " dist: $DIST" TMP_DIR="$(mktemp -d)" trap "rm -rf '$TMP_DIR'" exit @@ -182,6 +187,7 @@ MACOS_UPDATER="$(find "$BUNDLE_DIR/macos" -depth 1 -type f -name "*.tar.gz")" MACOS_UPDATER_SIG="$(find "$BUNDLE_DIR/macos" -depth 1 -type f -name "*.tar.gz.sig")" RELEASE_DIR="$DIST/$OS/$ARCH" +mkdir -p "$RELEASE_DIR" cp "$MACOS_DMG" "$RELEASE_DIR" cp "$MACOS_UPDATER" "$RELEASE_DIR" cp "$MACOS_UPDATER_SIG" "$RELEASE_DIR"