Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/release-tauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ jobs:
APPLE_SIGNING_IDENTITY: ${{ vars.APPLE_SIGNING_IDENTITY }}
APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
SWITCHIFY_TELEMETRY_ENDPOINT: ${{ vars.TIMBERLOGS_ENDPOINT }}
SWITCHIFY_SUPABASE_URL: ${{ vars.SWITCHIFY_SUPABASE_URL }}
SWITCHIFY_SUPABASE_PUBLISHABLE_KEY: ${{ vars.SWITCHIFY_SUPABASE_PUBLISHABLE_KEY }}
steps:
- name: Checkout release tag
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
Expand Down Expand Up @@ -193,12 +195,17 @@ jobs:
fi
for required_name in APPLE_API_ISSUER APPLE_API_KEY TIMBERLOGS_API_KEY \
SWITCHIFY_TELEMETRY_ENDPOINT TAURI_SIGNING_PRIVATE_KEY \
TAURI_SIGNING_PRIVATE_KEY_PASSWORD SWITCHIFY_UPDATER_PUBLIC_KEY; do
TAURI_SIGNING_PRIVATE_KEY_PASSWORD SWITCHIFY_UPDATER_PUBLIC_KEY \
SWITCHIFY_SUPABASE_URL SWITCHIFY_SUPABASE_PUBLISHABLE_KEY; do
if [[ -z "${!required_name:-}" ]]; then
echo "Missing macOS release configuration: $required_name" >&2
exit 1
fi
done
if [[ "$SWITCHIFY_SUPABASE_URL" != https://* ]]; then
echo 'SWITCHIFY_SUPABASE_URL must use https://, or accounts ship disabled.' >&2
exit 1
fi

- name: Install Developer ID certificate
shell: bash
Expand Down Expand Up @@ -320,6 +327,8 @@ jobs:
SWITCHIFY_UPDATER_PUBLIC_KEY: ${{ vars.TAURI_UPDATER_PUBLIC_KEY }}
SWITCHIFY_CERTUM_CERT_THUMBPRINT: ${{ vars.CERTUM_CERT_THUMBPRINT }}
SWITCHIFY_TELEMETRY_ENDPOINT: ${{ vars.TIMBERLOGS_ENDPOINT }}
SWITCHIFY_SUPABASE_URL: ${{ vars.SWITCHIFY_SUPABASE_URL }}
SWITCHIFY_SUPABASE_PUBLISHABLE_KEY: ${{ vars.SWITCHIFY_SUPABASE_PUBLISHABLE_KEY }}
steps:
- name: Checkout release tag
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
Expand Down Expand Up @@ -368,6 +377,8 @@ jobs:
'SWITCHIFY_UPDATER_PUBLIC_KEY',
'SWITCHIFY_CERTUM_CERT_THUMBPRINT',
'SWITCHIFY_TELEMETRY_ENDPOINT',
'SWITCHIFY_SUPABASE_URL',
'SWITCHIFY_SUPABASE_PUBLISHABLE_KEY',
'TIMBERLOGS_API_KEY',
'TAURI_SIGNING_PRIVATE_KEY',
'TAURI_SIGNING_PRIVATE_KEY_PASSWORD'
Expand All @@ -376,6 +387,9 @@ jobs:
throw "Missing Windows release configuration: $name"
}
}
if (-not $env:SWITCHIFY_SUPABASE_URL.StartsWith('https://')) {
throw 'SWITCHIFY_SUPABASE_URL must use https://, or accounts ship disabled.'
}

- name: Render updater configuration
run: node scripts/render-updater-config.mjs src-tauri/tauri.release.windows.generated.json --windows
Expand Down
6 changes: 6 additions & 0 deletions src-tauri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ fn main() {
"cancel_update_download",
"install_update",
"export_diagnostics",
"get_account",
"request_sign_in_code",
"verify_sign_in_code",
"cancel_sign_in",
"sign_out",
"delete_account",
]);
let mut attributes = tauri_build::Attributes::new().app_manifest(app_manifest);
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {
Expand Down
8 changes: 7 additions & 1 deletion src-tauri/capabilities/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
"allow-download-update",
"allow-cancel-update-download",
"allow-install-update",
"allow-export-diagnostics"
"allow-export-diagnostics",
"allow-get-account",
"allow-request-sign-in-code",
"allow-verify-sign-in-code",
"allow-cancel-sign-in",
"allow-sign-out",
"allow-delete-account"
]
}
11 changes: 11 additions & 0 deletions src-tauri/permissions/autogenerated/cancel_sign_in.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!

[[permission]]
identifier = "allow-cancel-sign-in"
description = "Enables the cancel_sign_in command without any pre-configured scope."
commands.allow = ["cancel_sign_in"]

[[permission]]
identifier = "deny-cancel-sign-in"
description = "Denies the cancel_sign_in command without any pre-configured scope."
commands.deny = ["cancel_sign_in"]
11 changes: 11 additions & 0 deletions src-tauri/permissions/autogenerated/delete_account.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!

[[permission]]
identifier = "allow-delete-account"
description = "Enables the delete_account command without any pre-configured scope."
commands.allow = ["delete_account"]

[[permission]]
identifier = "deny-delete-account"
description = "Denies the delete_account command without any pre-configured scope."
commands.deny = ["delete_account"]
11 changes: 11 additions & 0 deletions src-tauri/permissions/autogenerated/get_account.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!

[[permission]]
identifier = "allow-get-account"
description = "Enables the get_account command without any pre-configured scope."
commands.allow = ["get_account"]

[[permission]]
identifier = "deny-get-account"
description = "Denies the get_account command without any pre-configured scope."
commands.deny = ["get_account"]
11 changes: 11 additions & 0 deletions src-tauri/permissions/autogenerated/request_sign_in_code.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!

[[permission]]
identifier = "allow-request-sign-in-code"
description = "Enables the request_sign_in_code command without any pre-configured scope."
commands.allow = ["request_sign_in_code"]

[[permission]]
identifier = "deny-request-sign-in-code"
description = "Denies the request_sign_in_code command without any pre-configured scope."
commands.deny = ["request_sign_in_code"]
11 changes: 11 additions & 0 deletions src-tauri/permissions/autogenerated/sign_out.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!

[[permission]]
identifier = "allow-sign-out"
description = "Enables the sign_out command without any pre-configured scope."
commands.allow = ["sign_out"]

[[permission]]
identifier = "deny-sign-out"
description = "Denies the sign_out command without any pre-configured scope."
commands.deny = ["sign_out"]
11 changes: 11 additions & 0 deletions src-tauri/permissions/autogenerated/verify_sign_in_code.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!

[[permission]]
identifier = "allow-verify-sign-in-code"
description = "Enables the verify_sign_in_code command without any pre-configured scope."
commands.allow = ["verify_sign_in_code"]

[[permission]]
identifier = "deny-verify-sign-in-code"
description = "Denies the verify_sign_in_code command without any pre-configured scope."
commands.deny = ["verify_sign_in_code"]
Loading
Loading