fix: use YAML block scalar for signing key to preserve newlines

This commit is contained in:
t8y2
2026-05-04 22:23:02 +08:00
parent 4e93f18779
commit b6bec033e6
+3 -21
View File
@@ -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<<ENDOFKEY"
cat "$RUNNER_TEMP/signing.key"
echo "ENDOFKEY"
} >> "$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 }}