Skip to content

Commit

Permalink
Certs and profiles annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornoleh committed Jan 13, 2025
1 parent 4b94f10 commit 3eb5fe1
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/check_certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,31 @@ jobs:
run: bundle install

# Create or update provisioning profiles
- name: Check profiles
- name: Check certificate and profiles
run: |
echo "Running Fastlane certs lane..."
bundle exec fastlane certs 2>&1 | tee output.log
# Check Fastlane output and annotate
if grep -q "Provisioning profiles are valid and up-to-date" output.log; then
echo "::notice title=Provisioning Profiles::All profiles are valid and up-to-date."
elif grep -q "Profiles are out of sync or invalid. Updating..." output.log; then
echo "::notice title=Provisioning Profiles::Profiles were out of sync and have been updated."
elif grep -q "Provisioning profiles have been updated." output.log; then
bundle exec fastlane certs --verbose 2>&1 | tee output.log
# Check Fastlane output for Certificate
if grep -q -E "Your certificate .* is valid" output.log; then
echo "::notice title=Distribution Certificate::Your Distribution certificate is valid"
elif grep -q "Couldn't find a valid code signing identity for distribution... creating one for you now" output.log; then
echo "::notice title=Distribution Certificate::Couldn't find a valid Distribution certificate, creating one for you now."
fi
# Check Fastlane output for Profiles
if grep -q "No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you" output.log; then
echo "::notice title=Provisioning Profiles::No existing profiles found, creating new provisioning profiles for you."
elif grep -q "Updated appstore and platform ios" output.log; then
echo "::notice title=Provisioning Profiles::Profiles have been successfully updated."
else
echo "::notice title=Provisioning Profiles::Completed, but no specific action could be determined."
elif grep -q "(stored in your storage) is not available on the Developer Portal" output.log; then
echo "::notice title=Provisioning Profiles::The certificate in your Match-Secrets repository is not available on the Developer Portal"
fi
- name: Check Distribution Certificate and create or renew if needed
run: bundle exec fastlane check_and_renew_certificates
id: check_certs
Expand Down

0 comments on commit 3eb5fe1

Please sign in to comment.