Repository navigation
ci: replace Create iOS Certificates placeholder with the real workflow #585
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,86 @@ | ||
| name: Create iOS Certificates | ||
|
|
||
| run-name: "Create iOS Certificates - ${{ inputs.bundle-id }}" | ||
|
|
||
| # Creates an iOS app's signing certificates / provisioning profiles on CI, so developers don't | ||
| # need Ruby / fastlane / CocoaPods locally. | ||
| # | ||
| # PREREQUISITE: the App ID and the App Store Connect app record must already exist — create both | ||
| # by hand first. `match` won't create the identifier (it fails with "Couldn't find bundle | ||
| # identifier") and fastlane `produce` can't authenticate with the API key. | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| bundle-id: | ||
| description: "App bundle identifier (e.g. com.reown.merchantpos)" | ||
| required: true | ||
| type: string | ||
| certs-repo: | ||
| description: "Match certificates repo (owner/repo)" | ||
| required: true | ||
| default: 'reown-com/mobile-match' | ||
| type: string | ||
| match-types: | ||
| description: "Comma-separated match types to create" | ||
| required: true | ||
| default: 'appstore,development' | ||
| type: string | ||
|
|
||
| jobs: | ||
| placeholder: | ||
| name: Placeholder Job | ||
| runs-on: ubuntu-latest | ||
| create-certs: | ||
| runs-on: macos-latest-xlarge | ||
| steps: | ||
| - name: Do nothing | ||
| run: echo "Placeholder to enable manual dispatch from feature branches. The real workflow lives on the feature branch — run it via 'Use workflow from'." | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: webfactory/ssh-agent | ||
| uses: webfactory/ssh-agent@v0.9.0 | ||
| with: | ||
| ssh-private-key: ${{ secrets.MATCH_SSH_KEY }} | ||
|
|
||
| - name: Install Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: 3.3.0 | ||
| bundler-cache: true | ||
|
|
||
| # Certs go to a branch over SSH (MATCH_SSH_KEY), no GitHub token. A teammate opens and | ||
| # merges the PR in the certs repo — see the job summary. | ||
| - name: Create certificates | ||
| env: | ||
| APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }} | ||
| APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }} | ||
| APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }} | ||
| MATCH_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} | ||
| # Inputs via env, never inline in run: — ${{ }} expands before the shell parses, | ||
| # so a quote in an input would break out of the command. | ||
| INPUT_BUNDLE_ID: ${{ inputs.bundle-id }} | ||
| INPUT_CERTS_REPO: ${{ inputs.certs-repo }} | ||
| INPUT_MATCH_TYPES: ${{ inputs.match-types }} | ||
| run: | | ||
| chmod +x scripts/create-certificates.sh | ||
| IFS=',' read -ra TYPES <<< "$INPUT_MATCH_TYPES" | ||
| { | ||
| echo "### ✅ Certificates created — open and merge the PR(s)" | ||
| echo "This is the expected next step, not a failure: the workflow pushes the cert" | ||
| echo "branches over SSH and intentionally does **not** open PRs (it holds no write" | ||
| echo "token for \`$INPUT_CERTS_REPO\`)." | ||
| echo "" | ||
| echo "Open each PR below and merge it into \`master\` — the release workflow will" | ||
| echo "fail until you do:" | ||
| echo "" | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
| for type in "${TYPES[@]}"; do | ||
| type="$(echo "$type" | xargs)" # trim whitespace | ||
| [ -z "$type" ] && continue # tolerate a doubled comma in the input | ||
| echo "::group::Creating ${type} certificates" | ||
| ./scripts/create-certificates.sh "$INPUT_CERTS_REPO" "$INPUT_BUNDLE_ID" "" "$type" --no-pr | ||
| echo "::endgroup::" | ||
| branch="certs/add-${INPUT_BUNDLE_ID}-${type}" | ||
| compare="https://github.com/${INPUT_CERTS_REPO}/compare/master...${branch}?expand=1" | ||
| echo "- **${type}**: [open PR for \`${branch}\`](${compare})" >> "$GITHUB_STEP_SUMMARY" | ||
| done | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.