From 27d21a3815e30cbb5aa0313f34caab8948e86458 Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Thu, 13 Mar 2025 20:53:08 -0600 Subject: [PATCH 1/4] Add name to all steps --- .github/workflows/test.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e6fad6..f44f3bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,5 @@ name: "build-test" + on: # rebuild any PRs and main branch changes pull_request: push: @@ -10,24 +11,34 @@ jobs: runs-on: macOS-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v2 - - uses: Apple-Actions/import-codesign-certs@v1 + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Import Code Signing Certificates + uses: Apple-Actions/import-codesign-certs@v1 with: p12-file-base64: ${{ secrets.CERTIFICATES_FILE_BASE64 }} p12-password: ${{ secrets.CERTIFICATES_PASSWORD }} - - uses: Apple-Actions/download-provisioning-profiles@v1 + + - name: Download Provisioning Profiles + uses: Apple-Actions/download-provisioning-profiles@v1 with: bundle-id: codes.orj.Example-iOS issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} api-key-id: ${{ secrets.APPSTORE_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }} + - name: "#️⃣ Generate Build Number" id: buildnumber uses: einaregilsson/build-number@v2 with: token: ${{ secrets.github_token }} - - run: ./Build - - uses: Apple-Actions/upload-testflight-build@master + + - name: Build + run: ./Build + + - name: Upload TestFlight Build + uses: Apple-Actions/upload-testflight-build@master with: app-path: .build/Artifacts/Example-iOS.ipa/Example-iOS.ipa issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} From e997b98aa9bb9681ea2525c73701e57b8d24aff2 Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Thu, 13 Mar 2025 20:53:45 -0600 Subject: [PATCH 2/4] Use GITHUB_RUN_NUMBER instead of action https://einaregilsson.com/a-github-action-for-generating-sequential-build-numbers/ --- .github/workflows/test.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f44f3bb..5ea907a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,13 +28,9 @@ jobs: api-key-id: ${{ secrets.APPSTORE_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }} - - name: "#️⃣ Generate Build Number" - id: buildnumber - uses: einaregilsson/build-number@v2 - with: - token: ${{ secrets.github_token }} - - name: Build + env: + BUILD_NUMBER: ${{ github.run_number }} run: ./Build - name: Upload TestFlight Build From 215fdf960f6225e2f7570ee0e9120c0e1d379604 Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Thu, 13 Mar 2025 20:54:09 -0600 Subject: [PATCH 3/4] Use latest version of actions --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5ea907a..689fcb5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,16 +12,16 @@ jobs: timeout-minutes: 30 steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Import Code Signing Certificates - uses: Apple-Actions/import-codesign-certs@v1 + uses: Apple-Actions/import-codesign-certs@v3 with: p12-file-base64: ${{ secrets.CERTIFICATES_FILE_BASE64 }} p12-password: ${{ secrets.CERTIFICATES_PASSWORD }} - name: Download Provisioning Profiles - uses: Apple-Actions/download-provisioning-profiles@v1 + uses: Apple-Actions/download-provisioning-profiles@v3 with: bundle-id: codes.orj.Example-iOS issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} From 37c95b7a0c9a3f62a33ae763142bc503d30d0a3d Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Thu, 13 Mar 2025 20:57:28 -0600 Subject: [PATCH 4/4] Make Issuer ID and Key ID variables since Private Key is the secret --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 689fcb5..77297eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,8 +24,8 @@ jobs: uses: Apple-Actions/download-provisioning-profiles@v3 with: bundle-id: codes.orj.Example-iOS - issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} - api-key-id: ${{ secrets.APPSTORE_KEY_ID }} + issuer-id: ${{ vars.APPSTORE_ISSUER_ID }} + api-key-id: ${{ vars.APPSTORE_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }} - name: Build @@ -37,6 +37,6 @@ jobs: uses: Apple-Actions/upload-testflight-build@master with: app-path: .build/Artifacts/Example-iOS.ipa/Example-iOS.ipa - issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} - api-key-id: ${{ secrets.APPSTORE_KEY_ID }} + issuer-id: ${{ vars.APPSTORE_ISSUER_ID }} + api-key-id: ${{ vars.APPSTORE_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}