forked from utmapp/UTM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
160 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
id: checker | ||
shell: bash | ||
env: | ||
IS_SELF_HOSTED_RUNNER: ${{ vars.IS_SELF_HOSTED_RUNNER || (github.repository_owner == 'utmapp' && 'true') }} | ||
IS_SELF_HOSTED_RUNNER: ${{ secrets.IS_SELF_HOSTED_RUNNER || (github.repository_owner == 'utmapp' && 'true') }} | ||
run: | | ||
echo "github-runner='$RUNNER_IMAGE'" >> $GITHUB_OUTPUT | ||
if [ "$IS_SELF_HOSTED_RUNNER" == "true" ]; then | ||
|
@@ -52,14 +52,14 @@ jobs: | |
needs: configuration | ||
strategy: | ||
matrix: | ||
arch: [arm64] | ||
platform: [ios, ios_simulator, ios-tci, macos, visionos, visionos_simulator, visionos-tci] | ||
include: | ||
# x86_64 supported only for macOS and simulators | ||
arch: [arm64, x86_64] | ||
platform: [ios, ios_simulator, ios-tci, macos] | ||
exclude: | ||
# x86_64 does not exist on iOS | ||
- arch: x86_64 | ||
platform: macos | ||
platform: ios | ||
- arch: x86_64 | ||
platform: ios_simulator | ||
platform: ios-tci | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -81,6 +81,7 @@ jobs: | |
run: | | ||
echo "/usr/local/opt/bison/bin:/opt/homebrew/opt/bison/bin" >> $GITHUB_PATH | ||
- name: Install Requirements | ||
if: (steps.cache-sysroot.outputs.cache-hit != 'true' || github.event.inputs.rebuild_sysroot == 'true') && needs.configuration.outputs.runner == env.RUNNER_IMAGE | ||
run: | | ||
brew uninstall cmake | ||
brew install bison pkg-config gettext glib-utils libgpg-error nasm make meson | ||
|
@@ -151,14 +152,13 @@ jobs: | |
needs: [configuration, build-sysroot] | ||
strategy: | ||
matrix: | ||
arch: [arm64] | ||
platform: [ios, ios_simulator, ios-tci, macos, visionos, visionos_simulator, visionos-tci] | ||
include: | ||
# x86_64 supported only for macOS and simulators | ||
arch: [arm64, x86_64] | ||
platform: [ios, ios_simulator, ios-tci, macos] | ||
exclude: | ||
- arch: x86_64 | ||
platform: macos | ||
platform: ios | ||
- arch: x86_64 | ||
platform: ios_simulator | ||
platform: ios-tci | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -217,75 +217,172 @@ jobs: | |
./scripts/build_utm.sh -t "$SIGNING_TEAM_ID" -p macos -a "arm64 x86_64" -o UTM | ||
tar -acf UTM.xcarchive.tgz UTM.xcarchive | ||
env: | ||
SIGNING_TEAM_ID: ${{ vars.SIGNING_TEAM_ID }} | ||
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }} | ||
- name: Upload UTM | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: UTM-macos-universal | ||
path: UTM.xcarchive.tgz | ||
package-ios: | ||
name: Package (iOS) | ||
package-ipa: | ||
name: Package (iOS IPA) | ||
runs-on: ${{ fromJSON(needs.configuration.outputs.github-runner) }} | ||
needs: [configuration, build-utm] | ||
strategy: | ||
matrix: | ||
configuration: [ | ||
{platform: "ios", mode: "ipa", name: "UTM.ipa", path: "UTM.ipa"}, | ||
{platform: "ios-tci", mode: "ipa-se", name: "UTM-SE.ipa", path: "UTM SE.ipa"}, | ||
{platform: "ios", mode: "ipa-hv", name: "UTM-HV.ipa", path: "UTM.ipa"}, | ||
{platform: "ios", mode: "deb", name: "UTM.deb", path: "UTM.deb"}, | ||
{platform: "visionos", mode: "ipa", name: "UTM-visionOS.ipa", path: "UTM.ipa"}, | ||
{platform: "visionos-tci", mode: "ipa-se", name: "UTM-SE-visionOS.ipa", path: "UTM SE.ipa"} | ||
] | ||
if: github.event_name == 'release' || github.event.inputs.test_release == 'true' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: UTM-${{ matrix.configuration.platform }}-arm64 | ||
- name: Install ldid + dpkg | ||
run: brew install ldid dpkg | ||
name: UTM-ios-arm64 | ||
- name: Install ldid | ||
run: brew install ldid | ||
- name: Fakesign IPA | ||
run: | | ||
tar -xf UTM.xcarchive.tgz | ||
./scripts/package.sh ${{ matrix.configuration.mode }} UTM.xcarchive . | ||
./scripts/package.sh ipa UTM.xcarchive . | ||
- name: Upload Artifact | ||
if: github.event_name != 'release' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.configuration.name }} | ||
path: ${{ matrix.configuration.path }} | ||
name: UTM-ipa | ||
path: UTM.ipa | ||
- name: Upload Release Asset | ||
if: github.event_name == 'release' | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{ matrix.configuration.path }} | ||
asset_name: ${{ matrix.configuration.name }} | ||
asset_path: UTM.ipa | ||
asset_name: UTM.ipa | ||
asset_content_type: application/octet-stream | ||
dispatch-ios: | ||
name: Dispatch (iOS) | ||
runs-on: ubuntu-latest | ||
needs: package-ios | ||
if: github.event_name == 'release' | ||
- name: Send Dispatch Event | ||
if: github.event_name == 'release' | ||
continue-on-error: true | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
repository: ${{ secrets.DISPATCH_ALTSTORE_REPO_NAME }} | ||
event-type: new-release | ||
package-ipa-se: | ||
name: Package (iOS-TCI IPA) | ||
runs-on: ${{ fromJSON(needs.configuration.outputs.github-runner) }} | ||
needs: [configuration, build-utm] | ||
if: github.event_name == 'release' || github.event.inputs.test_release == 'true' | ||
steps: | ||
- name: Update AltStore Repository | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: UTM-ios-tci-arm64 | ||
- name: Install ldid | ||
run: brew install ldid | ||
- name: Fakesign IPA | ||
run: | | ||
tar -xf UTM.xcarchive.tgz | ||
./scripts/package.sh ipa-se UTM.xcarchive . | ||
- name: Upload Artifact | ||
if: github.event_name != 'release' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: UTM-SE-ipa | ||
path: UTM SE.ipa | ||
- name: Upload Release Asset | ||
if: github.event_name == 'release' | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: UTM SE.ipa | ||
asset_name: UTM SE.ipa | ||
asset_content_type: application/octet-stream | ||
- name: Send Dispatch Event | ||
if: github.event_name == 'release' | ||
continue-on-error: true | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
repository: ${{ vars.DISPATCH_ALTSTORE_REPO_NAME }} | ||
repository: ${{ secrets.DISPATCH_ALTSTORE_REPO_NAME }} | ||
event-type: new-release | ||
- name: Update Cydia Repository | ||
package-hv: | ||
name: Package (iOS HV) | ||
runs-on: ${{ fromJSON(needs.configuration.outputs.github-runner) }} | ||
needs: [configuration, build-utm] | ||
if: github.event_name == 'release' || github.event.inputs.test_release == 'true' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: UTM-ios-arm64 | ||
- name: Install ldid | ||
run: brew install ldid | ||
- name: Fakesign IPA | ||
run: | | ||
tar -xf UTM.xcarchive.tgz | ||
./scripts/package.sh ipa-hv UTM.xcarchive . | ||
mv UTM.ipa UTM.HV.ipa | ||
- name: Upload Artifact | ||
if: github.event_name != 'release' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: UTM-HV-ipa | ||
path: UTM.HV.ipa | ||
- name: Upload Release Asset | ||
if: github.event_name == 'release' | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: UTM.HV.ipa | ||
asset_name: UTM.HV.ipa | ||
asset_content_type: application/octet-stream | ||
package-deb: | ||
name: Package (iOS DEB) | ||
runs-on: ${{ fromJSON(needs.configuration.outputs.github-runner) }} | ||
needs: [configuration, build-utm] | ||
if: github.event_name == 'release' || github.event.inputs.test_release == 'true' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: UTM-ios-arm64 | ||
- name: Install ldid + dpkg | ||
run: brew install ldid dpkg | ||
- name: Fakesign IPA | ||
run: | | ||
tar -xf UTM.xcarchive.tgz | ||
./scripts/package.sh deb UTM.xcarchive . | ||
- name: Upload Artifact | ||
if: github.event_name != 'release' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: UTM-deb | ||
path: UTM.deb | ||
- name: Upload Release Asset | ||
if: github.event_name == 'release' | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: UTM.deb | ||
asset_name: UTM.deb | ||
asset_content_type: application/octet-stream | ||
- name: Send Dispatch Event | ||
if: github.event_name == 'release' | ||
continue-on-error: true | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
repository: ${{ vars.DISPATCH_CYDIA_REPO_NAME }} | ||
repository: ${{ secrets.DISPATCH_CYDIA_REPO_NAME }} | ||
event-type: new-release | ||
package-mac: | ||
name: Package (macOS) | ||
|
@@ -307,12 +404,12 @@ jobs: | |
echo $HELPER_PROFILE_DATA | base64 --decode -o ~/Library/MobileDevice/Provisioning\ Profiles/$HELPER_PROFILE_UUID.provisionprofile | ||
echo $LAUNCHER_PROFILE_DATA | base64 --decode -o ~/Library/MobileDevice/Provisioning\ Profiles/$LAUNCHER_PROFILE_UUID.provisionprofile | ||
env: | ||
PROFILE_DATA: ${{ vars.PROFILE_DATA }} | ||
PROFILE_UUID: ${{ vars.PROFILE_UUID }} | ||
HELPER_PROFILE_DATA: ${{ vars.HELPER_PROFILE_DATA }} | ||
HELPER_PROFILE_UUID: ${{ vars.HELPER_PROFILE_UUID }} | ||
LAUNCHER_PROFILE_DATA: ${{ vars.LAUNCHER_PROFILE_DATA }} | ||
LAUNCHER_PROFILE_UUID: ${{ vars.LAUNCHER_PROFILE_UUID }} | ||
PROFILE_DATA: ${{ secrets.PROFILE_DATA }} | ||
PROFILE_UUID: ${{ secrets.PROFILE_UUID }} | ||
HELPER_PROFILE_DATA: ${{ secrets.HELPER_PROFILE_DATA }} | ||
HELPER_PROFILE_UUID: ${{ secrets.HELPER_PROFILE_UUID }} | ||
LAUNCHER_PROFILE_DATA: ${{ secrets.LAUNCHER_PROFILE_DATA }} | ||
LAUNCHER_PROFILE_UUID: ${{ secrets.LAUNCHER_PROFILE_UUID }} | ||
- name: Install appdmg | ||
run: npm install -g appdmg | ||
- name: Download Artifact | ||
|
@@ -324,10 +421,10 @@ jobs: | |
tar -xf UTM.xcarchive.tgz | ||
./scripts/package_mac.sh developer-id UTM.xcarchive . "$SIGNING_TEAM_ID" "$PROFILE_UUID" "$HELPER_PROFILE_UUID" "$LAUNCHER_PROFILE_UUID" | ||
env: | ||
SIGNING_TEAM_ID: ${{ vars.SIGNING_TEAM_ID }} | ||
PROFILE_UUID: ${{ vars.PROFILE_UUID }} | ||
HELPER_PROFILE_UUID: ${{ vars.HELPER_PROFILE_UUID }} | ||
LAUNCHER_PROFILE_UUID: ${{ vars.LAUNCHER_PROFILE_UUID }} | ||
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }} | ||
PROFILE_UUID: ${{ secrets.PROFILE_UUID }} | ||
HELPER_PROFILE_UUID: ${{ secrets.HELPER_PROFILE_UUID }} | ||
LAUNCHER_PROFILE_UUID: ${{ secrets.LAUNCHER_PROFILE_UUID }} | ||
- name: Notarize app | ||
run: npx notarize-cli --file "UTM.dmg" --bundle-id "com.utmapp.UTM" | ||
env: | ||
|
@@ -369,12 +466,12 @@ jobs: | |
echo $HELPER_PROFILE_DATA | base64 --decode -o ~/Library/MobileDevice/Provisioning\ Profiles/$HELPER_PROFILE_UUID.provisionprofile | ||
echo $LAUNCHER_PROFILE_DATA | base64 --decode -o ~/Library/MobileDevice/Provisioning\ Profiles/$LAUNCHER_PROFILE_UUID.provisionprofile | ||
env: | ||
PROFILE_DATA: ${{ vars.APP_STORE_PROFILE_DATA }} | ||
PROFILE_UUID: ${{ vars.APP_STORE_PROFILE_UUID }} | ||
HELPER_PROFILE_DATA: ${{ vars.APP_STORE_HELPER_PROFILE_DATA }} | ||
HELPER_PROFILE_UUID: ${{ vars.APP_STORE_HELPER_PROFILE_UUID }} | ||
LAUNCHER_PROFILE_DATA: ${{ vars.APP_STORE_LAUNCHER_PROFILE_DATA }} | ||
LAUNCHER_PROFILE_UUID: ${{ vars.APP_STORE_LAUNCHER_PROFILE_UUID }} | ||
PROFILE_DATA: ${{ secrets.APP_STORE_PROFILE_DATA }} | ||
PROFILE_UUID: ${{ secrets.APP_STORE_PROFILE_UUID }} | ||
HELPER_PROFILE_DATA: ${{ secrets.APP_STORE_HELPER_PROFILE_DATA }} | ||
HELPER_PROFILE_UUID: ${{ secrets.APP_STORE_HELPER_PROFILE_UUID }} | ||
LAUNCHER_PROFILE_DATA: ${{ secrets.APP_STORE_LAUNCHER_PROFILE_DATA }} | ||
LAUNCHER_PROFILE_UUID: ${{ secrets.APP_STORE_LAUNCHER_PROFILE_UUID }} | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
|
@@ -384,10 +481,10 @@ jobs: | |
tar -xf UTM.xcarchive.tgz | ||
./scripts/package_mac.sh app-store UTM.xcarchive . "$SIGNING_TEAM_ID" "$PROFILE_UUID" "$HELPER_PROFILE_UUID" "$LAUNCHER_PROFILE_UUID" | ||
env: | ||
SIGNING_TEAM_ID: ${{ vars.SIGNING_TEAM_ID }} | ||
PROFILE_UUID: ${{ vars.APP_STORE_PROFILE_UUID }} | ||
HELPER_PROFILE_UUID: ${{ vars.APP_STORE_HELPER_PROFILE_UUID }} | ||
LAUNCHER_PROFILE_UUID: ${{ vars.APP_STORE_LAUNCHER_PROFILE_UUID }} | ||
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }} | ||
PROFILE_UUID: ${{ secrets.APP_STORE_PROFILE_UUID }} | ||
HELPER_PROFILE_UUID: ${{ secrets.APP_STORE_HELPER_PROFILE_UUID }} | ||
LAUNCHER_PROFILE_UUID: ${{ secrets.APP_STORE_LAUNCHER_PROFILE_UUID }} | ||
- name: Upload Artifact | ||
if: github.event_name != 'release' | ||
uses: actions/upload-artifact@v3 | ||
|