From b6bec033e6491f0a88807655f790583d4ed3b57f Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Mon, 4 May 2026 22:23:02 +0800 Subject: [PATCH] fix: use YAML block scalar for signing key to preserve newlines --- .github/workflows/release.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6566dfccf..5f5bbf0bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,27 +81,6 @@ jobs: sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev - - name: Setup Tauri signing key - shell: bash - run: | - printf '%s\n%s\n' "untrusted comment: rsign encrypted secret key" "${{ secrets.TAURI_SIGNING_KEY_BODY }}" > "$RUNNER_TEMP/signing.key" - echo "=== Key file byte count ===" - wc -c "$RUNNER_TEMP/signing.key" - echo "=== Key file line count ===" - wc -l "$RUNNER_TEMP/signing.key" - echo "=== First line length ===" - head -1 "$RUNNER_TEMP/signing.key" | wc -c - echo "=== Second line length ===" - tail -1 "$RUNNER_TEMP/signing.key" | wc -c - echo "=== hexdump of first 80 bytes ===" - xxd -l 80 "$RUNNER_TEMP/signing.key" - { - echo "TAURI_SIGNING_PRIVATE_KEY<> "$GITHUB_ENV" - echo "=== Env var set via GITHUB_ENV ===" - - name: Build Tauri app uses: tauri-apps/tauri-action@v0 env: @@ -110,6 +89,9 @@ jobs: APPLE_ID: ${{ startsWith(matrix.platform, 'macos') && secrets.APPLE_ID || '' }} APPLE_PASSWORD: ${{ startsWith(matrix.platform, 'macos') && secrets.APPLE_PASSWORD || '' }} APPLE_TEAM_ID: ${{ startsWith(matrix.platform, 'macos') && secrets.APPLE_TEAM_ID || '' }} + TAURI_SIGNING_PRIVATE_KEY: |- + untrusted comment: rsign encrypted secret key + ${{ secrets.TAURI_SIGNING_KEY_BODY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: "" with: tagName: ${{ github.ref_name }}