diff --git a/.github/workflows/nuke_certs.yml b/.github/workflows/nuke_certs.yml new file mode 100644 index 000000000..3bd1cdbc9 --- /dev/null +++ b/.github/workflows/nuke_certs.yml @@ -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"