Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/create_certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@ jobs:

# Create or update Distribution certificate and provisioning profiles
- name: Check and create or update Distribution certificate and profiles if needed
id: certs
run: |
echo "Running Fastlane certs lane..."
bundle exec fastlane certs || true # ignore and continue on errors without annotating an exit code
# Continue on errors without annotating an exit code; set_output fails the job if no renewal follows
if bundle exec fastlane certs; then
echo "certs_failed=false" >> $GITHUB_OUTPUT
else
echo "certs_failed=true" >> $GITHUB_OUTPUT
fi

- name: Check Distribution certificate and launch Nuke certificates if needed
run: bundle exec fastlane check_and_renew_certificates
Expand Down Expand Up @@ -88,6 +94,12 @@ jobs:
echo "::warning::‼️ Nuking of certificates was forced because the repository variable FORCE_NUKE_CERTS is set to 'true'."
fi

# Fail if the certificate setup failed and no renewal will replace it
if [ "${{ steps.certs.outputs.certs_failed }}" = "true" ] && [ "$CERT_STATUS" != "true" ] && [ "$FORCE_NUKE_CERTS" != "true" ]; then
echo "::error::❌ Fastlane Match could not use the Distribution certificate in your Match-Secrets repository, and automated renewal will not run because another valid certificate exists. Delete https://github.com/${{ github.repository_owner }}/Match-Secrets and run action again: https://loopkit.github.io/loopdocs/browser/bb-errors/#delete-match-secrets"
exit 1
fi

# Nuke Certs if needed, and if the repository variable ENABLE_NUKE_CERTS is set to 'true', or if FORCE_NUKE_CERTS is set to 'true', which will always force certs to be nuked
nuke_certs:
name: Nuke certificates
Expand Down
4 changes: 3 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ platform :ios do
issuer_id: "#{FASTLANE_ISSUER_ID}",
key_content: "#{FASTLANE_KEY}"
)


ensure_watch_identifiers_exist

match(
type: "appstore",
force: false,
Expand Down