Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[deliver] add support for App Store Connect API Key #17238

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Sep 14, 2020

Motivation and Context

Enable App Store Connect API Key auth with deliver (no Apple ID)

Description

  • Added api_key and api_key_path options to deliver
  • Used different versions of endpoints that are compatible with both the Apple ID and Token session

Examples

1. New action
lane :release do
  api_key = app_store_connect_api_key(
    key_id: "D383SF739",
    issuer_id: "6053b7fe-68a8-4acb-89be-165aa6465141",
    key_filepath: "./D383SF739.p8",
    duration: 1200, # optional
    in_house: false, # optional but may be required if using match/sigh
  )

  deliver( api_key: api_key )
end
2. New file format
{
  "key_id": "D383SF739",
  "issuer_id": "6053b7fe-68a8-4acb-89be-165aa6465141",
  "key": "-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHknlhdlYdLu\n-----END PRIVATE KEY-----",
  “duration”: 1200, # optional
  “in_house”: false, # optional but may be required if using match/sigh
}
lane :release do
  deliver( api_key_path: "fastlane/me.json" )
end

Testing Steps

Update Gemfile and run bundle install, bundle update fastlane, or bundle update

gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "joshdholtz-deliver-app-store-connect-api-key"

@joshdholtz joshdholtz changed the base branch from master to joshdholtz-deliver-add-retry-fetching-edit-versions September 14, 2020 23:33
@joshdholtz joshdholtz changed the title Joshdholtz deliver app store connect api key [deliver] add support for App Store Connect API Key Sep 14, 2020
@joshdholtz joshdholtz merged commit 96681aa into joshdholtz-deliver-add-retry-fetching-edit-versions Sep 15, 2020
@joshdholtz joshdholtz deleted the joshdholtz-deliver-app-store-connect-api-key branch September 15, 2020 21:38
@rogerluan
Copy link
Member

@joshdholtz since this was merged into another PR, will this PR be included in the release notes (assuming the release notes are generated automatically)? If not, it probably should hehe

And/or maybe update the PR description of #17235 ? 😇

(Took me awhile to realize that this PR wasn't merged to master, so I was in master looking for the new code and couldn't find it for the world 😆 )

@joshdholtz
Copy link
Member Author

Yup yup, I'll be manually adding it to the release notes when I make it (since it won't appear) 😊

Thanks for asking about it though!

joshdholtz pushed a commit that referenced this pull request Sep 15, 2020
…17235)

* [deliver] add retry when fetching edit app version and edit app info

* rubocop

* Added tests

* Moved methods around

* [deliver] add support for App Store Connect API Key (#17238)

* It mostly works

* Download works

* Rubo

* Some cleanup

* Fixed tests

* Precheck mostly works with ASC API

* Spelling

* Updated API key option descriptions
@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.160.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Nov 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants