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

Add workflow (nuke_certs) for Annual Certificates Reset #191

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
50 changes: 50 additions & 0 deletions .github/workflows/nuke_certs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 9. Annual Certificates Reset
run-name: Annual Certificates Reset (${{ github.ref_name }})
on:
workflow_dispatch:

jobs:
validate:
name: Validate
uses: ./.github/workflows/validate_secrets.yml
secrets: inherit

nuke_certs:
runs-on: macos-14
steps:
# Uncomment to manually select latest Xcode if needed
#- name: Select Latest Xcode
# run: "sudo xcode-select --switch /Applications/Xcode_13.0.app/Contents/Developer"

# Checks-out the repo
- name: Checkout Repo
uses: actions/checkout@v4

# Patch Fastlane Match to not print tables
- name: Patch Match Tables
run: find /usr/local/lib/ruby/gems -name table_printer.rb | xargs sed -i "" "/puts(Terminal::Table.new(params))/d"

# Patch Fastlane Match nuke to not print tables
- name: Patch Nuke Tables
run: find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" "/ print_tables/d"

# Patch Fastlane Match nuke to not print other misc messages
- name: Patch Other Nuke Info
run: |
find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" '/UI.message("Deleting profile /d'
find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" '/UI.message("Certificate /d'
find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" '/UI.message("Revoking certificate /d'
find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" '/UI.message("Deleting file /d'

# Remove all development certificates for Loop from Apple developer account
- name: Fastlane Nuke Certificates
run: fastlane nuke_certs
env:
TEAMID: ${{ secrets.TEAMID }}
GH_PAT: ${{ secrets.GH_PAT }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_KEY_ID: ${{ secrets.FASTLANE_KEY_ID }}
FASTLANE_ISSUER_ID: ${{ secrets.FASTLANE_ISSUER_ID }}
FASTLANE_KEY: ${{ secrets.FASTLANE_KEY }}
FASTLANE_SKIP_ALL_LANE_SUMMARIES: "true"