-
Notifications
You must be signed in to change notification settings - Fork 225
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
Automate signed pkg build for macOS App Store submission #2624
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very interesting ;-). I think only @emlynmac can really comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to make this work along side the ad-hoc signing.
The changes here will break the existing signing set up.
Ad hoc requires:
- Signing
- Notarizing
- Stapling the package when notarization complete
App Store distribution requires
- Signing (with a different certificate)
- Packaging
- Installer signing (with an installer certificate)
- Validation
- Upload
I'd like to see the App Store target work along side the existing ad-hoc signing steps.
Good to hear! |
Yes sure, and from the build checks above it looks like it works transparently when signing deps are not satisfied. As I noted in the iOS PR #2625 the build now attempts to validate and upload to App Store using |
@emlynmac any news? |
Updated with the necessary logic to validate and upload the signed macOS "pkg" installer to the Mac App Store when the necessary conditions are met (I thought I had already done this!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it's close to get in. It of course raises the questions when/if we deploy a cert in our repo.
The cert stuff is obviously most easily handled by whoever already has the App Store Connect account for Jamulus. I don't think the certs are any more sensitive than the existing auth details you are already using for dmg file Notarization ( |
Fair point. Emlyn owns the cert for now and not many people have push access to his repo. |
When/if he gets round to it Emlyn will have to create the 2 new certificates and follow the guides as mentioned in the description. Apple doesn't make this easy enough IMO - too much downloading certificates, importing to keychain manager, exporting as p12 then base64 encoding - for each cert. It's a pain. |
@danryu could you please rebase this PR? I think fixing the app store alongside signing isn't an unsolvable issue (check if app store cert is present --> if not skip modifications) |
@ann0see Yes, can do. I'll need a few days at least to review things. |
@danryu any updates? |
Sorry, hit a very busy period. I managed to take a look today but the rebase appeared problematic, so I've gone with a merge - hope that's ok. Looks like there might be some style check failures still, at least. |
Ok. Thanks. Merging makes it a lot more difficult to get right later - but I hope we can figure it out. Fixing the styling should be possible |
Coding style checks now fixed |
Great! Thanks. Maybe this gets ready for 3.11.0 (next release, not this one) |
Maybe you're on the wrong local branch? Check what commits |
It's because your I see you have a copy of my I'm happy to help, but that probably needs to be done interactively. What messaging method do you prefer? Do you have Discord? What time zone are you in? |
Thanks, I think that the divergence between branches makes this a bit too much overhead to be worthwhile. That was a temporary branch at the time and I'd rather just dump it at this point. I just have a single commit to make - if you can give me permissions to push to your branch softins:macos-sign-squash then I can update there. |
Just copy and paste the changes of the commit here. You can use a git patch https://devconnected.com/how-to-create-and-apply-git-patch-files/ |
Thanks, I couldn't get git format-patch to produce anything, so I used git diff directly. |
@softins I also pushed the update to https://github.com/koord-live/koord-app-compat/tree/appstore2 if you just want to pull that? FWIW, what steps would be required to update my fork? I pushed the upstream main branch but that didn't help. Just curious :) |
@danryu thanks! I have a busy day today (UK time), but will hopefully get to it later. I'll also answer your question about updating too. |
@danryu I linked your repo as an additional remote, and I found your So we can either merge my branch via #3309, or your could reset your
I see you now have the up to date |
@softins Thanks, I went with your instructions (I hadn't thought to do the git reset previously!) Unfortunately the macOS build breaks at the dmg creation stage - possibly related to this (intermittent?) error? PS I didn't make any changes to this part, so I think my changes are working correctly (thus far) |
Great, all looks good to me.
Yes,
Cool. I'll set this PR as "Ready for review" instead of "Draft" and will close my #3309 in favour of this one. |
Yes, re-running succeeded for all platforms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok now. Let's get it merged and deal with anything that might occur when we try signing and/or submitting.
This PR doesn't appear to allow pushes from project maintainers (I tried), so we rely on @danryu applying suggested changes. |
Thanks, I've applied the changes as suggested (I think the for loop was a leftover from an earlier iteration, so it was good to remove that!) |
Before us merging, please squash the commits into one: e.g via |
I'd like all the "Outdated" but still not "Resolved" comments marked resolved, if they have been, too, please. |
Ok. Squash merged. Not ideal, but the PR ID shows up. Thanks all for waiting this long! |
Note: For the certificate IDs, check |
Concerning the altool upload to app store connect, I didn't look too much into it/tested it, but I belive we could have something like this as starting point: upload_pkg_to_appstore_connect() {
# Upload pkg build to App Store connect. See https://help.apple.com/asc/appsaltool/#/apdATD1E53-D1E1A1303-D1E53A1126 for more information
# Validate if pkg meets minimum App Store requirements
xcrun altool --validate-app -f "${ARTIFACT_PATH}" \
-u "${NOTARIZATION_USERNAME}" \
-p "${NOTARIZATION_PASSWORD}"
# Upload binary package to App Store connect
xcrun altool --upload-package "${ARTIFACT_PATH}" \
--apple-id "${NOTARIZATION_USERNAME}" \
--bundle-id "${NOTARIZATION_BUNDLE_ID}" \
--bundle-short-version-string "${JAMULUS_BUILD_VERSION}" \
--bundle-version "${JAMULUS_BUILD_VERSION}" \
--team-id "${APPLE_TEAM_ID}" \
-u "${NOTARIZATION_USERNAME}" \
-p "${NOTARIZATION_PASSWORD}"
} |
This PR adds automation to create a signed pkg (installer) file for direct submission to the macOS App Store, and then submits that signed installer to Apple App Store Connect (macOS Testflight) to allow it to be selected for App Store release.
CHANGELOG: Build: adds macOS signed pkg build automation
Context: automates building of signed pkg file for macOS App Store
Does this change need documentation? What needs to be documented and how?
Required:
Certificates:
Identifier:
Status of this Pull Request
What is missing until this pull request can be merged?
Checklist