mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 17:29:55 -05:00
[V1] Fixed Tauri Cert Signing
This commit is contained in:
@@ -74,26 +74,6 @@ jobs:
|
|||||||
- name: Install JS dependencies
|
- name: Install JS dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Import Apple signing certificate
|
|
||||||
env:
|
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
|
||||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
if [ -z "$APPLE_CERTIFICATE" ]; then
|
|
||||||
echo "No certificate configured — building unsigned."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
CERT_PATH=$RUNNER_TEMP/certificate.p12
|
|
||||||
KEYCHAIN_PATH=$RUNNER_TEMP/build.keychain
|
|
||||||
echo "$APPLE_CERTIFICATE" | base64 --decode > "$CERT_PATH"
|
|
||||||
security create-keychain -p "" "$KEYCHAIN_PATH"
|
|
||||||
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
|
|
||||||
security unlock-keychain -p "" "$KEYCHAIN_PATH"
|
|
||||||
security import "$CERT_PATH" -P "$APPLE_CERTIFICATE_PASSWORD" \
|
|
||||||
-A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
|
|
||||||
security set-key-partition-list -S apple-tool:,apple: -k "" "$KEYCHAIN_PATH"
|
|
||||||
security list-keychains -d user -s "$KEYCHAIN_PATH" login.keychain
|
|
||||||
|
|
||||||
- name: Download Suwayomi binaries
|
- name: Download Suwayomi binaries
|
||||||
run: |
|
run: |
|
||||||
download_suwayomi() {
|
download_suwayomi() {
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ fn patch_conf_key(mut text: String, key: &str, value: &str) -> String {
|
|||||||
let replacement = format!("{key} = {value}");
|
let replacement = format!("{key} = {value}");
|
||||||
// Find a line that starts with the key (tolerant of surrounding whitespace)
|
// Find a line that starts with the key (tolerant of surrounding whitespace)
|
||||||
if let Some(pos) = text.lines().position(|l| l.trim_start().starts_with(key)) {
|
if let Some(pos) = text.lines().position(|l| l.trim_start().starts_with(key)) {
|
||||||
let mut lines: Vec<&str> = text.lines().collect();
|
let lines: Vec<&str> = text.lines().collect();
|
||||||
// We need an owned replacement; rebuild from scratch.
|
// We need an owned replacement; rebuild from scratch.
|
||||||
let owned: Vec<String> = lines
|
let owned: Vec<String> = lines
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
Reference in New Issue
Block a user