develop-build.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. name: Build for Develop TestFlight
  2. on:
  3. push:
  4. branches:
  5. - develop
  6. - release*
  7. - ci-test
  8. jobs:
  9. build:
  10. name: Build
  11. runs-on: macOS-12
  12. steps:
  13. - name: Checkout
  14. uses: actions/checkout@v2
  15. - name: Setup
  16. env:
  17. NotificationEndpointDebug: ${{ secrets.NotificationEndpointDebug }}
  18. NotificationEndpointRelease: ${{ secrets.NotificationEndpointRelease }}
  19. run: exec ./.github/scripts/setup.sh
  20. - name: Install codemagic-cli-tools
  21. uses: actions/setup-python@v4
  22. with:
  23. python-version: '3.11'
  24. - run: |
  25. pip3 install codemagic-cli-tools
  26. - run: |
  27. codemagic-cli-tools --version || true
  28. - name: Import Code-Signing Certificates
  29. uses: Apple-Actions/import-codesign-certs@v1 # https://github.com/Apple-Actions/import-codesign-certs
  30. with:
  31. keychain: build-p12
  32. p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
  33. p12-password: ${{ secrets.P12_PASSWORD }}
  34. - name: Download Provisioning Profiles
  35. uses: Apple-Actions/download-provisioning-profiles@v1 # https://github.com/Apple-Actions/download-provisioning-profiles
  36. with:
  37. bundle-id: org.joinmastodon.app
  38. issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
  39. api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
  40. api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
  41. - name: Build
  42. env:
  43. ENV_APP_ID: ${{ secrets.APP_ID }}
  44. ENV_ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }}
  45. ENV_API_KEY_ID: ${{ secrets.APPSTORE_KEY_ID }}
  46. ENV_API_PRIVATE_KEY: ${{ secrets.APPSTORE_PRIVATE_KEY }}
  47. ENV_API_PRIVATE_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_KEY_BASE64 }}
  48. run: exec ./.github/scripts/build-release.sh
  49. - name: Upload TestFlight Build
  50. uses: Apple-Actions/upload-testflight-build@master
  51. with:
  52. app-path: .build/Artifacts/Mastodon.ipa/Mastodon.ipa
  53. issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
  54. api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
  55. api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
  56. - name: Tag commit
  57. uses: tvdias/github-tagger@v0.0.1
  58. with:
  59. repo-token: "${{ secrets.GITHUB_TOKEN }}"
  60. tag: "${{ env.GITHUB_TAG_NAME }}"
  61. - name: Clean up keychain and provisioning profile
  62. if: ${{ always() }}
  63. run: |
  64. security delete-keychain build-p12.keychain-db