Skip to content

Use ASC API key env vars - #3951

Merged
mokagio merged 5 commits into
trunkfrom
ainfra-228-use-env-var-instead-of-encrypted-json-for-asc-api-key-in
Jul 6, 2026
Merged

Use ASC API key env vars#3951
mokagio merged 5 commits into
trunkfrom
ainfra-228-use-env-var-instead-of-encrypted-json-for-asc-api-key-in

Conversation

@mokagio

@mokagio mokagio commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Codex applied the same App Store Connect credential migration pattern used in recent WordPress iOS, and WooCommerce iOS changes.

Proposed Changes

  • Move Studio's macOS signing and notarization flow away from the encrypted App Store Connect JSON key and onto the standard APP_STORE_CONNECT_API_KEY_* environment variables. Better because removes an encrypted file from the repo.

Testing Instructions

The macOS builds succeed in CI:

image

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors? — N.A.

Read App Store Connect credentials through fastlane's built-in environment variable support instead of the JSON key previously materialized by `.configure`.
This aligns Studio with the recent AutoProxxy, wpiOS, and WooCommerce iOS migrations, and removes obsolete encrypted secret files from the repo.

Readonly certificate fetches continue to use match's S3 storage without App Store Connect access; notarization now reads the standard `APP_STORE_CONNECT_API_KEY_*` trio from the agent environment.

---

Generated with the help of Codex, https://chatgpt.com/codex

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
@mokagio mokagio self-assigned this Jun 25, 2026
@mokagio
mokagio marked this pull request as ready for review June 26, 2026 02:09
@mokagio
mokagio requested a review from a team as a code owner June 26, 2026 02:09
Copilot AI review requested due to automatic review settings June 26, 2026 02:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.

Comment thread fastlane/Fastfile
Comment on lines 66 to 70
sync_code_signing(
platform: 'macos',
app_identifier: APPLE_BUNDLE_IDENTIFIER,
team_id: APPLE_TEAM_ID,
type: 'developer_id',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first, I thought that no, this was overly cautious because the lane hardcodes readonly: true so the API key will not be used.

But, thinking about it, maybe it makes sense to future proof so that if we ever want to pass readonly: false, the code already knows how to handle the API key correctly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9a4fea0 addresses this

Comment thread fastlane/Fastfile
Comment on lines 79 to 83
Dir[File.join(BUILDS_FOLDER, '**', 'Studio.app')].each do |path|
notarize(
package: path,
api_key_path: APPLE_API_KEY_PATH,
api_key: app_store_connect_api_key,
print_log: true

@iangmaia iangmaia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock, but I believe there's one copilot comment worth considering.

@mokagio
mokagio enabled auto-merge (squash) July 6, 2026 05:11
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 70c2a60 vs trunk

app-size

Metric trunk 70c2a60 Diff Change
App Size (Mac) 1345.18 MB 1345.18 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 70c2a60 Diff Change
load 1096 ms 759 ms 337 ms 🟢 -30.7%

site-startup

Metric trunk 70c2a60 Diff Change
siteCreation 6537 ms 6483 ms 54 ms 🟢 -0.8%
siteStartup 1858 ms 1857 ms 1 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@mokagio
mokagio merged commit 41f5020 into trunk Jul 6, 2026
11 checks passed
@mokagio
mokagio deleted the ainfra-228-use-env-var-instead-of-encrypted-json-for-asc-api-key-in branch July 6, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants