|
5 | 5 | - created |
6 | 6 | jobs: |
7 | 7 | build: |
8 | | - name: Build ${{ matrix.configuration['platform'] }} Release |
9 | | - runs-on: macos-13 |
| 8 | + name: Build ${{ matrix.platform }} Release |
| 9 | + runs-on: macos-14 |
| 10 | + permissions: |
| 11 | + contents: write |
10 | 12 | strategy: |
11 | 13 | fail-fast: false |
12 | 14 | matrix: |
13 | | - configuration: |
14 | | - - scheme: App (iOS) |
15 | | - destination: generic/platform=iOS |
| 15 | + include: |
| 16 | + - destination: generic/platform=iOS |
16 | 17 | platform: iOS |
17 | | - method: ad-hoc |
18 | | - artifact-file: Apple/Release/Burrow.ipa |
19 | | - - scheme: App (macOS) |
20 | | - destination: generic/platform=macOS |
| 18 | + rust-targets: |
| 19 | + - aarch64-apple-ios |
| 20 | + - destination: generic/platform=macOS |
21 | 21 | platform: macOS |
22 | | - method: mac-application |
23 | | - artifact-file: Burrow.app.txz |
| 22 | + rust-targets: |
| 23 | + - x86_64-apple-darwin |
| 24 | + - aarch64-apple-darwin |
24 | 25 | env: |
25 | 26 | DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer |
| 27 | + GH_TOKEN: ${{ github.token }} |
26 | 28 | steps: |
27 | 29 | - name: Checkout |
28 | | - uses: actions/checkout@v3 |
| 30 | + uses: actions/checkout@v4 |
29 | 31 | with: |
30 | | - ssh-key: ${{ secrets.DEPLOY_KEY }} |
31 | | - submodules: recursive |
| 32 | + fetch-depth: 0 |
32 | 33 | - name: Import Certificate |
33 | 34 | uses: ./.github/actions/import-cert |
34 | 35 | with: |
35 | 36 | certificate: ${{ secrets.DEVELOPER_CERT }} |
36 | 37 | password: ${{ secrets.DEVELOPER_CERT_PASSWORD }} |
| 38 | + - name: Install Rust |
| 39 | + uses: dtolnay/rust-toolchain@stable |
| 40 | + with: |
| 41 | + targets: ${{ join(matrix.rust-targets, ', ') }} |
37 | 42 | - name: Archive |
38 | 43 | uses: ./.github/actions/archive |
39 | 44 | with: |
40 | | - scheme: ${{ matrix.configuration['scheme'] }} |
41 | | - destination: ${{ matrix.configuration['destination'] }} |
| 45 | + scheme: App |
| 46 | + destination: ${{ matrix.destination }} |
42 | 47 | app-store-key: ${{ secrets.APPSTORE_KEY }} |
43 | 48 | app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }} |
44 | 49 | app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }} |
45 | 50 | archive-path: Burrow.xcarchive |
46 | | - - name: Export Locally |
| 51 | + - name: Upload |
47 | 52 | uses: ./.github/actions/export |
48 | 53 | with: |
49 | | - method: ${{ matrix.configuration['method'] }} |
| 54 | + method: app-store |
| 55 | + destination: upload |
| 56 | + app-store-key: ${{ secrets.APPSTORE_KEY }} |
| 57 | + app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }} |
| 58 | + app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }} |
| 59 | + archive-path: Burrow.xcarchive |
| 60 | + export-path: Release |
| 61 | + - name: Notarize |
| 62 | + if: ${{ matrix.platform == 'macOS' }} |
| 63 | + uses: ./.github/actions/notarize |
| 64 | + with: |
| 65 | + app-store-key: ${{ secrets.APPSTORE_KEY }} |
| 66 | + app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }} |
| 67 | + app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }} |
| 68 | + archive-path: Burrow.xcarchive |
| 69 | + - name: Export IPA |
| 70 | + if: ${{ matrix.platform == 'iOS' }} |
| 71 | + uses: ./.github/actions/export |
| 72 | + with: |
| 73 | + method: ad-hoc |
50 | 74 | destination: export |
51 | 75 | app-store-key: ${{ secrets.APPSTORE_KEY }} |
52 | 76 | app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }} |
53 | 77 | app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }} |
54 | 78 | archive-path: Burrow.xcarchive |
55 | 79 | export-path: Release |
56 | | - - name: Compress |
57 | | - if: ${{ matrix.configuration['platform'] == 'macOS' }} |
| 80 | + - name: Compress (iOS) |
| 81 | + if: ${{ matrix.platform == 'iOS' }} |
58 | 82 | shell: bash |
59 | | - run: tar --options xz:compression-level=9 -C Apple/Release -cJf Burrow.app.txz ./ |
60 | | - - name: Attach Artifact |
61 | | - uses: SierraSoftworks/[email protected] |
| 83 | + run: | |
| 84 | + cp Apple/Release/Burrow.ipa -o Burrow.ipa |
| 85 | + aa archive -a lzma -b 8m -d Apple -subdir Burrow.xcarchive -o Burrow-${{ matrix.platform }}.xcarchive.aar |
| 86 | + rm -rf Apple/Release |
| 87 | + - name: Compress (macOS) |
| 88 | + if: ${{ matrix.platform == 'macOS' }} |
| 89 | + shell: bash |
| 90 | + run: | |
| 91 | + aa archive -a lzma -b 8m -d Apple/Release -subdir Burrow.app -o Burrow.app.aar |
| 92 | + aa archive -a lzma -b 8m -d Apple -subdir Burrow.xcarchive -o Burrow-${{ matrix.platform }}.xcarchive.aar |
| 93 | + rm -rf Apple/Release |
| 94 | + - name: Get Build Number |
| 95 | + id: version |
| 96 | + shell: bash |
| 97 | + run: | |
| 98 | + echo "BUILD_NUMBER=$(Tools/version.sh)" >> $GITHUB_OUTPUT |
| 99 | + - name: Attach Artifacts (iOS) |
| 100 | + if: ${{ matrix.platform == 'iOS' }} |
| 101 | + uses: SierraSoftworks/[email protected] |
| 102 | + with: |
| 103 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 104 | + release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }} |
| 105 | + overwrite: 'true' |
| 106 | + files: | |
| 107 | + Burrow.ipa |
| 108 | + Burrow-${{ matrix.platform }}.xcarchive.aar |
| 109 | + - name: Attach Artifacts (macOS) |
| 110 | + if: ${{ matrix.platform == 'macOS' }} |
| 111 | + uses: SierraSoftworks/[email protected] |
62 | 112 | with: |
63 | 113 | token: ${{ secrets.GITHUB_TOKEN }} |
64 | | - overwrite: 'false' |
65 | | - files: ${{ matrix.configuration['artifact-file'] }} |
| 114 | + release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }} |
| 115 | + overwrite: 'true' |
| 116 | + files: | |
| 117 | + Burrow.aap.aar |
| 118 | + Burrow-${{ matrix.platform }}.xcarchive.aar |
0 commit comments