From 7767bb0e7d8efe78078b320473b55e22e52be503 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 16:16:21 +0530 Subject: [PATCH 01/13] Set up fastlane --- macOS/.gitignore | 5 + macOS/Gemfile | 4 + macOS/Gemfile.lock | 232 ++++++++++++++++++++++++++++++++++++++++ macOS/fastlane/Appfile | 1 + macOS/fastlane/Fastfile | 48 +++++++++ 5 files changed, 290 insertions(+) create mode 100644 macOS/Gemfile create mode 100644 macOS/Gemfile.lock create mode 100644 macOS/fastlane/Appfile create mode 100644 macOS/fastlane/Fastfile diff --git a/macOS/.gitignore b/macOS/.gitignore index e2b06cdb..3a09e373 100644 --- a/macOS/.gitignore +++ b/macOS/.gitignore @@ -1,2 +1,7 @@ /XToolMac.xcodeproj Private*.xcconfig + +/fastlane/README.md +/fastlane/report.xml +/Build +/Private diff --git a/macOS/Gemfile b/macOS/Gemfile new file mode 100644 index 00000000..ac29d10f --- /dev/null +++ b/macOS/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem 'fastlane' +gem 'fastlane-plugin-xcodegen' diff --git a/macOS/Gemfile.lock b/macOS/Gemfile.lock new file mode 100644 index 00000000..d99ec6cf --- /dev/null +++ b/macOS/Gemfile.lock @@ -0,0 +1,232 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.7) + base64 + nkf + rexml + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + artifactory (3.0.17) + atomos (0.1.3) + aws-eventstream (1.3.2) + aws-partitions (1.1101.0) + aws-sdk-core (3.223.0) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.992.0) + aws-sigv4 (~> 1.9) + base64 + jmespath (~> 1, >= 1.6.1) + logger + aws-sdk-kms (1.100.0) + aws-sdk-core (~> 3, >= 3.216.0) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.185.0) + aws-sdk-core (~> 3, >= 3.216.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.11.0) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + base64 (0.2.0) + claide (1.1.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + declarative (0.0.20) + digest-crc (0.7.0) + rake (>= 12.0.0, < 14.0.0) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.8.1) + emoji_regex (3.2.3) + excon (0.109.0) + faraday (1.10.4) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) + http-cookie (~> 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.1.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.1) + faraday (~> 1.0) + fastimage (2.4.0) + fastlane (2.227.2) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.3, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored (~> 1.2) + commander (~> 4.6) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + fastlane-sirp (>= 1.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) + google-cloud-storage (~> 1.31) + highline (~> 2.0) + http-cookie (~> 1.0.5) + json (< 3.0.0) + jwt (>= 2.1.0, < 3) + mini_magick (>= 4.9.4, < 5.0.0) + multipart-post (>= 2.0.0, < 3.0.0) + naturally (~> 2.2) + optparse (>= 0.1.1, < 1.0.0) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 2.0.0, < 3.0.0) + security (= 0.1.5) + simctl (~> 1.6.3) + terminal-notifier (>= 2.0.0, < 3.0.0) + terminal-table (~> 3) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.4.1) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-plugin-brew (0.1.1) + fastlane-plugin-xcodegen (1.1.0) + fastlane-plugin-brew (~> 0.1.1) + fastlane-sirp (1.0.0) + sysrandom (~> 1.0) + gh_inspector (1.1.3) + google-apis-androidpublisher_v3 (0.54.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-core (0.11.3) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + google-apis-iamcredentials_v1 (0.17.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-playcustomapp_v1 (0.13.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-storage_v1 (0.29.0) + google-apis-core (>= 0.11.0, < 2.a) + google-cloud-core (1.6.1) + google-cloud-env (>= 1.0, < 3.a) + google-cloud-errors (~> 1.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) + google-cloud-errors (1.3.1) + google-cloud-storage (1.45.0) + addressable (~> 2.8) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.29.0) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) + mini_mime (~> 1.0) + googleauth (1.8.1) + faraday (>= 0.17.3, < 3.a) + jwt (>= 1.4, < 3.0) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.8) + domain_name (~> 0.5) + httpclient (2.9.0) + mutex_m + jmespath (1.6.2) + json (2.7.6) + jwt (2.10.1) + base64 + logger (1.7.0) + mini_magick (4.13.2) + mini_mime (1.1.5) + multi_json (1.15.0) + multipart-post (2.4.1) + mutex_m (0.3.0) + nanaimo (0.4.0) + naturally (2.2.1) + nkf (0.2.0) + optparse (0.6.0) + os (1.1.4) + plist (3.7.2) + public_suffix (5.1.1) + rake (13.2.1) + representable (3.2.0) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rexml (3.4.1) + rouge (3.28.0) + ruby2_keywords (0.0.5) + rubyzip (2.4.1) + security (0.1.5) + signet (0.18.0) + addressable (~> 2.8) + faraday (>= 0.17.5, < 3.a) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.10) + CFPropertyList + naturally + sysrandom (1.0.5) + terminal-notifier (2.0.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + trailblazer-option (0.1.2) + tty-cursor (0.7.1) + tty-screen (0.8.2) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + uber (0.1.0) + unf (0.2.0) + unicode-display_width (2.6.0) + word_wrap (1.0.0) + xcodeproj (1.27.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.4.0) + rexml (>= 3.3.6, < 4.0) + xcpretty (0.4.1) + rouge (~> 3.28.0) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + ruby + +DEPENDENCIES + fastlane + fastlane-plugin-xcodegen + +BUNDLED WITH + 1.17.2 diff --git a/macOS/fastlane/Appfile b/macOS/fastlane/Appfile new file mode 100644 index 00000000..94c5a447 --- /dev/null +++ b/macOS/fastlane/Appfile @@ -0,0 +1 @@ +app_identifier("sh.xtool.XToolMac") diff --git a/macOS/fastlane/Fastfile b/macOS/fastlane/Fastfile new file mode 100644 index 00000000..e167f594 --- /dev/null +++ b/macOS/fastlane/Fastfile @@ -0,0 +1,48 @@ +default_platform(:mac) + +ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" + +lane :package do + xcodegen + + # Config is controlled via env vars + app_store_connect_api_key( + is_key_content_base64: true, + ) + + Tempfile.create(["Identity", ".p12"]) do |file| + file.write(Base64.decode64(ENV["IDENTITY_P12"])) + file.close + import_certificate( + certificate_path: file.path, + keychain_name: "login", + ) + end + + sigh( + platform: "macos", + output_path: "./Build/Signing", + force: true, + developer_id: true, + ) + + gym( + export_method: "developer-id", + output_directory: "./Build/Output", + xcargs: "DEVELOPMENT_TEAM=#{ENV["DEVELOPMENT_TEAM"]}" + ) + + notarize( + package: "./Build/Output/xtool.app", + ) + + # we need to re-package after notarization and stapling. + # we have to use `ditto --sequesterRsrc` rather than zip + # because the default strategy stores resource forks as + # ._Foo but codesigning doesn't like that, and instead + # wants them in __MACOSX. + sh( + "ditto", "-c", "-k", "--keepParent", "--sequesterRsrc", + "../Build/Output/xtool.app", "../Build/Output/xtool.app.zip", + ) +end From e36d225052f61ed935fc299beb652a29a09bcd90 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 16:16:29 +0530 Subject: [PATCH 02/13] Add release-macos workflow --- .github/workflows/release-macos.yml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/release-macos.yml diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml new file mode 100644 index 00000000..bcf454be --- /dev/null +++ b/.github/workflows/release-macos.yml @@ -0,0 +1,31 @@ +on: + workflow_dispatch: + +jobs: + build: + runs-on: macos-15 + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build + env: + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} + IDENTITY_P12: ${{ secrets.IDENTITY_P12 }} + DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} + run: | + cd macOS + bundle exec fastlane package + - name: Upload app + uses: actions/upload-artifact@v4 + with: + name: xtool.app.zip + path: macOS/Build/Output/xtool.app.zip + - name: Upload dSYMs + uses: actions/upload-artifact@v4 + with: + name: xtool.app.dSYM.zip + path: macOS/Build/Output/xtool.app.dSYM.zip From 03c6f20bfec60c676978395a8c1c879b271a4f75 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 16:18:12 +0530 Subject: [PATCH 03/13] for now --- .github/workflows/release-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml index bcf454be..74ecb66e 100644 --- a/.github/workflows/release-macos.yml +++ b/.github/workflows/release-macos.yml @@ -1,5 +1,6 @@ on: workflow_dispatch: + push: jobs: build: From 8f3ed581bca5e99296a814d8a9e2a73f3327eac1 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 16:19:46 +0530 Subject: [PATCH 04/13] bundle install --- .github/workflows/release-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml index 74ecb66e..56db0e5d 100644 --- a/.github/workflows/release-macos.yml +++ b/.github/workflows/release-macos.yml @@ -19,6 +19,7 @@ jobs: DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} run: | cd macOS + bundle install bundle exec fastlane package - name: Upload app uses: actions/upload-artifact@v4 From 5449fa02c1e6e4401198c49008ea644a81f52b12 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 16:34:01 +0530 Subject: [PATCH 05/13] Ruby versioning --- macOS/.ruby-version | 1 + macOS/Gemfile.lock | 27 +++++++++++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 macOS/.ruby-version diff --git a/macOS/.ruby-version b/macOS/.ruby-version new file mode 100644 index 00000000..6cb9d3dd --- /dev/null +++ b/macOS/.ruby-version @@ -0,0 +1 @@ +3.4.3 diff --git a/macOS/Gemfile.lock b/macOS/Gemfile.lock index d99ec6cf..c3aff356 100644 --- a/macOS/Gemfile.lock +++ b/macOS/Gemfile.lock @@ -10,7 +10,7 @@ GEM artifactory (3.0.17) atomos (0.1.3) aws-eventstream (1.3.2) - aws-partitions (1.1101.0) + aws-partitions (1.1102.0) aws-sdk-core (3.223.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) @@ -37,11 +37,10 @@ GEM declarative (0.0.20) digest-crc (0.7.0) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20240107) dotenv (2.8.1) emoji_regex (3.2.3) - excon (0.109.0) + excon (0.112.0) faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -133,19 +132,19 @@ GEM google-apis-core (>= 0.11.0, < 2.a) google-apis-playcustomapp_v1 (0.13.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.29.0) + google-apis-storage_v1 (0.31.0) google-apis-core (>= 0.11.0, < 2.a) - google-cloud-core (1.6.1) + google-cloud-core (1.8.0) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.3.1) - google-cloud-storage (1.45.0) + google-cloud-errors (1.5.0) + google-cloud-storage (1.47.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.29.0) + google-apis-storage_v1 (~> 0.31.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) @@ -161,7 +160,7 @@ GEM httpclient (2.9.0) mutex_m jmespath (1.6.2) - json (2.7.6) + json (2.11.3) jwt (2.10.1) base64 logger (1.7.0) @@ -176,7 +175,7 @@ GEM optparse (0.6.0) os (1.1.4) plist (3.7.2) - public_suffix (5.1.1) + public_suffix (6.0.2) rake (13.2.1) representable (3.2.0) declarative (< 0.1.0) @@ -188,7 +187,7 @@ GEM ruby2_keywords (0.0.5) rubyzip (2.4.1) security (0.1.5) - signet (0.18.0) + signet (0.20.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) @@ -206,7 +205,6 @@ GEM tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) - unf (0.2.0) unicode-display_width (2.6.0) word_wrap (1.0.0) xcodeproj (1.27.0) @@ -222,6 +220,7 @@ GEM xcpretty (~> 0.2, >= 0.0.7) PLATFORMS + arm64-darwin-24 ruby DEPENDENCIES @@ -229,4 +228,4 @@ DEPENDENCIES fastlane-plugin-xcodegen BUNDLED WITH - 1.17.2 + 2.6.7 From 5e8053b7a5a9a9cd7c0c0089d07a05cf40e92f1b Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 18:36:25 +0530 Subject: [PATCH 06/13] Fix Ruby 3.4 --- macOS/Gemfile | 5 +++++ macOS/Gemfile.lock | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/macOS/Gemfile b/macOS/Gemfile index ac29d10f..02b672ee 100644 --- a/macOS/Gemfile +++ b/macOS/Gemfile @@ -2,3 +2,8 @@ source 'https://rubygems.org' gem 'fastlane' gem 'fastlane-plugin-xcodegen' + +# https://github.com/fastlane/fastlane/issues/29183#issuecomment-2567093826 +gem "abbrev" +gem "mutex_m" +gem "ostruct" diff --git a/macOS/Gemfile.lock b/macOS/Gemfile.lock index c3aff356..29aa2fb2 100644 --- a/macOS/Gemfile.lock +++ b/macOS/Gemfile.lock @@ -5,6 +5,7 @@ GEM base64 nkf rexml + abbrev (0.1.2) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) artifactory (3.0.17) @@ -174,6 +175,7 @@ GEM nkf (0.2.0) optparse (0.6.0) os (1.1.4) + ostruct (0.6.1) plist (3.7.2) public_suffix (6.0.2) rake (13.2.1) @@ -224,8 +226,11 @@ PLATFORMS ruby DEPENDENCIES + abbrev fastlane fastlane-plugin-xcodegen + mutex_m + ostruct BUNDLED WITH 2.6.7 From 00072203c8fbe6f80b000a7cba774d0c6537a502 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 18:36:35 +0530 Subject: [PATCH 07/13] Maybe fix CI --- macOS/fastlane/Fastfile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/macOS/fastlane/Fastfile b/macOS/fastlane/Fastfile index e167f594..f2ed40a2 100644 --- a/macOS/fastlane/Fastfile +++ b/macOS/fastlane/Fastfile @@ -10,12 +10,19 @@ lane :package do is_key_content_base64: true, ) + create_keychain( + name: "xtool.keychain", + password: "", + unlock: true, + ) + Tempfile.create(["Identity", ".p12"]) do |file| file.write(Base64.decode64(ENV["IDENTITY_P12"])) file.close import_certificate( certificate_path: file.path, - keychain_name: "login", + keychain_name: "xtool.keychain", + keychain_password: "", ) end @@ -26,10 +33,16 @@ lane :package do developer_id: true, ) + update_code_signing_settings( + use_automatic_signing: false, + team_id: ENV["DEVELOPMENT_TEAM"], + code_sign_identity: "Developer ID Application", + profile_name: lane_context[SharedValues::SIGH_NAME], + ) + gym( export_method: "developer-id", output_directory: "./Build/Output", - xcargs: "DEVELOPMENT_TEAM=#{ENV["DEVELOPMENT_TEAM"]}" ) notarize( From 1ecbb9524d4841b9c665855064488bb583ca2295 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 19:01:51 +0530 Subject: [PATCH 08/13] Maybe unlock? --- macOS/fastlane/Fastfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/macOS/fastlane/Fastfile b/macOS/fastlane/Fastfile index f2ed40a2..0dbfea92 100644 --- a/macOS/fastlane/Fastfile +++ b/macOS/fastlane/Fastfile @@ -16,6 +16,11 @@ lane :package do unlock: true, ) + unlock_keychain( + path: "xtool.keychain", + password: "", + ) + Tempfile.create(["Identity", ".p12"]) do |file| file.write(Base64.decode64(ENV["IDENTITY_P12"])) file.close From cb35986e18cc80f16c47cce72a19c0386505886d Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 19:16:08 +0530 Subject: [PATCH 09/13] Update Release workflow --- .github/workflows/release-macos.yml | 33 ------------------ .../{release-linux.yml => release.yml} | 34 +++++++++++++++---- 2 files changed, 28 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/release-macos.yml rename .github/workflows/{release-linux.yml => release.yml} (54%) diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml deleted file mode 100644 index 56db0e5d..00000000 --- a/.github/workflows/release-macos.yml +++ /dev/null @@ -1,33 +0,0 @@ -on: - workflow_dispatch: - push: - -jobs: - build: - runs-on: macos-15 - permissions: - contents: write - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build - env: - APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} - APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} - APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} - IDENTITY_P12: ${{ secrets.IDENTITY_P12 }} - DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} - run: | - cd macOS - bundle install - bundle exec fastlane package - - name: Upload app - uses: actions/upload-artifact@v4 - with: - name: xtool.app.zip - path: macOS/Build/Output/xtool.app.zip - - name: Upload dSYMs - uses: actions/upload-artifact@v4 - with: - name: xtool.app.dSYM.zip - path: macOS/Build/Output/xtool.app.dSYM.zip diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release.yml similarity index 54% rename from .github/workflows/release-linux.yml rename to .github/workflows/release.yml index 45f1ae57..b9120bdc 100644 --- a/.github/workflows/release-linux.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ on: workflow_dispatch: jobs: - build: + build-linux: strategy: fail-fast: false matrix: @@ -21,13 +21,37 @@ jobs: run: | docker compose run --build --rm xtool -c "Linux/build.sh && mv Linux/packages/xtool{,-${{ matrix.host.arch }}}.AppImage" - name: Upload artifact - id: upload_artifact uses: actions/upload-artifact@v4 with: name: xtool-${{ matrix.host.arch }} path: Linux/packages/xtool-${{ matrix.host.arch }}.AppImage + build-mac: + runs-on: macos-15 + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build + env: + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} + IDENTITY_P12: ${{ secrets.IDENTITY_P12 }} + DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} + run: | + cd macOS + bundle install + bundle exec fastlane package + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: xtool-mac + path: | + macOS/Build/Output/xtool.app.zip + macOS/Build/Output/xtool.app.dSYM.zip release: - needs: build + needs: [build-linux, build-mac] runs-on: ubuntu-24.04 permissions: contents: write @@ -36,14 +60,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Download artifact - id: download_artifact uses: actions/download-artifact@v4 with: pattern: xtool-* path: output - name: Create and publish release - id: publish_release run: | TAG="${GITHUB_REF##*/}-${GITHUB_SHA:0:7}" gh release create "$TAG" --draft --title "Draft Release" - gh release upload "$TAG" output/**/*.AppImage + gh release upload "$TAG" output/**/*.{AppImage,app.zip,app.dSYM.zip} From e635167471a90792b59a395e1271b47bf1005486 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 19:16:55 +0530 Subject: [PATCH 10/13] on push --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9120bdc..788e5da8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,6 @@ on: workflow_dispatch: + push: jobs: build-linux: From 69fc1e8abf0091f2c116908bf170d63c257889d9 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 19:31:25 +0530 Subject: [PATCH 11/13] tweaks --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 788e5da8..1f0e770b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,5 @@ on: workflow_dispatch: - push: jobs: build-linux: @@ -42,7 +41,7 @@ jobs: DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} run: | cd macOS - bundle install + bundle install --frozen bundle exec fastlane package - name: Upload artifacts uses: actions/upload-artifact@v4 From 64001f388a91cb26f12e47fb66c94fc15188056d Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 19:32:00 +0530 Subject: [PATCH 12/13] =?UTF-8?q?don=E2=80=99t=20use=20frozen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1f0e770b..b9120bdc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,7 @@ jobs: DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} run: | cd macOS - bundle install --frozen + bundle install bundle exec fastlane package - name: Upload artifacts uses: actions/upload-artifact@v4 From f960c64446feabc90dc04374511f66a03e269017 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 10 May 2025 19:40:03 +0530 Subject: [PATCH 13/13] Trying something a lil different --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9120bdc..ad68e72c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,6 @@ on: workflow_dispatch: + push: jobs: build-linux: @@ -32,6 +33,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + working-directory: macOS + bundler-cache: true - name: Build env: APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} @@ -41,7 +47,6 @@ jobs: DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} run: | cd macOS - bundle install bundle exec fastlane package - name: Upload artifacts uses: actions/upload-artifact@v4