Skip to content

Commit

Permalink
feat(cli): iOS signing for CI usage (#9963)
Browse files Browse the repository at this point in the history
* feat(cli): iOS signing for CI usage

* license headers

* change file

* chore: support more cert types

* xplicit method arg

* keep keychain alive

* fix early keychano drop

* set team id

* use common name as cert name
  • Loading branch information
lucasfernog authored Jul 12, 2024
1 parent 532b3b1 commit 7c7fa09
Show file tree
Hide file tree
Showing 21 changed files with 1,836 additions and 384 deletions.
8 changes: 6 additions & 2 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,14 @@
"path": "./core/tauri-utils",
"manager": "rust"
},
"tauri-macos-sign": {
"path": "./tooling/macos-sign",
"manager": "rust"
},
"tauri-bundler": {
"path": "./tooling/bundler",
"manager": "rust",
"dependencies": ["tauri-utils"]
"dependencies": ["tauri-utils", "tauri-macos-sign"]
},
"tauri-runtime": {
"path": "./core/tauri-runtime",
Expand Down Expand Up @@ -262,7 +266,7 @@
"tauri-cli": {
"path": "./tooling/cli",
"manager": "rust",
"dependencies": ["tauri-bundler", "tauri-utils"],
"dependencies": ["tauri-bundler", "tauri-utils", "tauri-macos-sign"],
"postversion": [
"cargo check",
"cargo build --manifest-path ../../core/tauri-config-schema/Cargo.toml"
Expand Down
6 changes: 6 additions & 0 deletions .changes/ios-export-method.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-cli": patch:feat
"@tauri-apps/cli": patch:feat
---

Added `--method` argument for `ios build` to select the export options' method.
6 changes: 6 additions & 0 deletions .changes/ios-signing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-cli": patch:feat
"@tauri-apps/cli": patch:feat
---

Setup iOS signing by reading `IOS_CERTIFICATE`, `IOS_CERTIFICATE_PASSWORD` and `IOS_MOBILE_PROVISION` environment variables.
5 changes: 5 additions & 0 deletions .changes/macos-sign-initial-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-macos-sign": minor:feat
---

Initial release.
1 change: 1 addition & 0 deletions tooling/bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ glob = "0.3"
icns = { package = "tauri-icns", version = "0.1" }
time = { version = "0.3", features = [ "formatting" ] }
plist = "1"
tauri-macos-sign = { version = "0.0.0", path = "../macos-sign" }

[target."cfg(any(target_os = \"macos\", target_os = \"windows\"))".dependencies]
regex = "1"
Expand Down
4 changes: 2 additions & 2 deletions tooling/bundler/src/bundle/macos/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
remove_extra_attr(&app_bundle_path)?;

// sign application
sign(sign_paths, identity, settings)?;
let keychain = sign(sign_paths, identity, settings)?;

// notarization is required for distribution
match notarize_auth() {
Ok(auth) => {
notarize(app_bundle_path.clone(), auth, settings)?;
notarize(&keychain, app_bundle_path.clone(), &auth)?;
}
Err(e) => {
if matches!(e, NotarizeAuthError::MissingTeamId) {
Expand Down
Loading

0 comments on commit 7c7fa09

Please sign in to comment.