From 4b8a198543a03b4d4ad8cbcbc42bd4fa4095524d Mon Sep 17 00:00:00 2001 From: Graeme Arthur <2030310+graeme@users.noreply.github.com> Date: Thu, 6 Jul 2023 17:51:35 +0200 Subject: [PATCH 01/30] Wip alpha workflow --- .github/workflows/alpha.yml | 137 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 4 +- fastlane/Fastfile | 15 +++- 3 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/alpha.yml diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml new file mode 100644 index 0000000000..aeaa6eac5d --- /dev/null +++ b/.github/workflows/alpha.yml @@ -0,0 +1,137 @@ +name: Make TestFlight Alpha Build + +on: + # workflow_dispatch: + # inputs: + # destination: + # description: "Upload destination (App Store or TestFlight)" + # required: true + # default: appstore + # type: choice + # options: + # - appstore + # - testflight + # asana-task-url: + # description: "Asana release task URL" + # required: false + # type: string + + pull_request: + branches: + - develop + - '!develop' # filter out PRs matching that pattern + types: [closed] + +jobs: + make-release: + if: github.event.action == 0 || github.event.pull_request.merged == true # empty string returns 0; for case when workflow is triggered manually + runs-on: macos-13 + name: Make TestFlight Alpha Build + + steps: + + # - name: Set destination output + # id: destination + # run: | + # INPUT_DESTINATION=${{ github.event.inputs.destination }} + # echo "destination=${INPUT_DESTINATION:-"appstore"}" >> $GITHUB_OUTPUT + + # - name: Assert release branch + # if: steps.destination.outputs.destination == 'appstore' + # run: | + # case "${{ github.ref }}" in + # *release/*) ;; + # *hotfix/*) ;; + # *) echo "👎 Not a release or hotfix branch"; exit 1 ;; + # esac + + - name: Register SSH keys for access to certificates + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_FASTLANE_MATCH }} + + - name: Check out the code + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Set cache key hash + run: | + has_only_tags=$(jq '[ .object.pins[].state | has("version") ] | all' DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved) + if [[ "$has_only_tags" == "true" ]]; then + echo "cache_key_hash=${{ hashFiles('DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}" >> $GITHUB_ENV + else + echo "Package.resolved contains dependencies specified by branch or commit, skipping cache." + fi + + - name: Cache SPM + if: env.cache_key_hash + uses: actions/cache@v3 + with: + path: DerivedData/SourcePackages + key: ${{ runner.os }}-spm-${{ env.cache_key_hash }} + restore-keys: | + ${{ runner.os }}-spm- + + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer + + - name: Prepare fastlane + run: bundle install + + - name: Archive and upload the app + env: + APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} + APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} + APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + run: | + bundle exec fastlane release_${{ steps.destination.outputs.destination }} + app_version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" + echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV + echo "app_version=${app_version}" >> $GITHUB_ENV + + - name: Upload dSYMs artifact + uses: actions/upload-artifact@v3 + with: + name: DuckDuckGo-${{ steps.destination.outputs.destination }}-dSYM-${{ env.app_version }} + path: ${{ env.dsyms_path }} + + # - name: Get Asana Task ID + # id: get-task-id + # if: github.event.inputs.asana-task-url + # run: | + # task_url_regex='^https://app.asana.com/[0-9]/[0-9]*/([0-9]*)/f$' + # if [[ "${{ github.event.inputs.asana-task-url }}" =~ ${task_url_regex} ]]; then + # echo "task_id=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT + # else + # echo "::error::Asana Task URL has incorrect format (attempted to match ${task_url_regex})." + # fi + + # - name: Upload debug symbols to Asana + # if: github.event.inputs.asana-task-url + # env: + # ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} + # run: | + # asana_dsyms_path="${{ github.workspace }}/DuckDuckGo-${{ env.app_version }}-dSYM.zip" + # mv -f "${{ env.dsyms_path }}" "$asana_dsyms_path" + + # curl -s "https://app.asana.com/api/1.0/tasks/${{ steps.get-task-id.outputs.task_id }}/attachments" \ + # -H "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ + # --form "file=@${asana_dsyms_path};type=application/zip" + + - name: Send Mattermost message + env: + WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + DESTINATION: ${{ steps.destination.outputs.destination }} + run: | + export MM_USER_HANDLE=$(base64 -d <<< ${{ secrets.MM_HANDLES_BASE64 }} | jq ".${{ github.actor }}" | tr -d '"') + + if [[ -z "${MM_USER_HANDLE}" ]]; then + echo "Mattermost user handle not known for ${{ github.actor }}, skipping sending message" + else + + curl -s -H 'Content-type: application/json' \ + -d "$(envsubst < ./scripts/assets/appstore-release-mm-template.json)" \ + ${{ secrets.MM_WEBHOOK_URL }} + fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a23744c96..df737b9341 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,13 +4,13 @@ on: workflow_dispatch: inputs: destination: - description: "Upload destination (App Store or TestFlight)" + description: "Type of release (App Store or Beta)" required: true default: appstore type: choice options: - appstore - - testflight + - beta asana-task-url: description: "Asana release task URL" required: false diff --git a/fastlane/Fastfile b/fastlane/Fastfile index a0628434d8..68ba69d71e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -122,11 +122,22 @@ lane :upload_metadata do |options| end desc 'Makes App Store release build and uploads it to TestFlight' -lane :release_testflight do +lane :release_beta do build_release upload_to_testflight( - api_key: get_api_key + api_key: get_api_key, + groups: "iOS Daily Testers" + ) +end + +desc 'Makes alpha build and uploads it to TestFlight' +lane :release_alpha do + build_release + + upload_to_testflight( + api_key: get_api_key, + groups: "iOS Daily Testers" ) end From d10c1ec0ba8c9299305e321546431afd7364de12 Mon Sep 17 00:00:00 2001 From: Graeme Arthur <2030310+graeme@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:19:26 +0200 Subject: [PATCH 02/30] Add temporary push trigger --- .github/workflows/alpha.yml | 99 ++++++++++++++----------------------- 1 file changed, 38 insertions(+), 61 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index aeaa6eac5d..03adc1efa8 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -1,27 +1,16 @@ name: Make TestFlight Alpha Build on: - # workflow_dispatch: - # inputs: - # destination: - # description: "Upload destination (App Store or TestFlight)" - # required: true - # default: appstore - # type: choice - # options: - # - appstore - # - testflight - # asana-task-url: - # description: "Asana release task URL" - # required: false - # type: string - pull_request: branches: - develop - - '!develop' # filter out PRs matching that pattern + - graeme/ios-nightly-builds + #- '!develop' # filter out PRs matching that pattern types: [closed] + push: + branches: [ develop, graeme/ios-nightly-builds ] + jobs: make-release: if: github.event.action == 0 || github.event.pull_request.merged == true # empty string returns 0; for case when workflow is triggered manually @@ -36,14 +25,13 @@ jobs: # INPUT_DESTINATION=${{ github.event.inputs.destination }} # echo "destination=${INPUT_DESTINATION:-"appstore"}" >> $GITHUB_OUTPUT - # - name: Assert release branch - # if: steps.destination.outputs.destination == 'appstore' - # run: | - # case "${{ github.ref }}" in - # *release/*) ;; - # *hotfix/*) ;; - # *) echo "👎 Not a release or hotfix branch"; exit 1 ;; - # esac + - name: Assert develop branch + run: | + case "${{ github.ref }}" in + *develop/*) ;; + *hotfix/*) ;; + *) echo "👎 Not a release or hotfix branch"; exit 1 ;; + esac - name: Register SSH keys for access to certificates uses: webfactory/ssh-agent@v0.7.0 @@ -86,52 +74,41 @@ jobs: APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} run: | - bundle exec fastlane release_${{ steps.destination.outputs.destination }} + bundle exec fastlane release_alpha app_version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" - echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV - echo "app_version=${app_version}" >> $GITHUB_ENV +# echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV +# echo "app_version=${app_version}" >> $GITHUB_ENV - name: Upload dSYMs artifact uses: actions/upload-artifact@v3 with: - name: DuckDuckGo-${{ steps.destination.outputs.destination }}-dSYM-${{ env.app_version }} + name: DuckDuckGo-alpha-dSYM-${{ env.app_version }} path: ${{ env.dsyms_path }} - # - name: Get Asana Task ID - # id: get-task-id - # if: github.event.inputs.asana-task-url - # run: | - # task_url_regex='^https://app.asana.com/[0-9]/[0-9]*/([0-9]*)/f$' - # if [[ "${{ github.event.inputs.asana-task-url }}" =~ ${task_url_regex} ]]; then - # echo "task_id=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT - # else - # echo "::error::Asana Task URL has incorrect format (attempted to match ${task_url_regex})." - # fi + - name: Upload debug symbols to Asana + if: github.event.inputs.asana-task-url + env: + ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} + run: | + asana_dsyms_path="${{ github.workspace }}/DuckDuckGo-${{ env.app_version }}-dSYM.zip" + mv -f "${{ env.dsyms_path }}" "$asana_dsyms_path" + + curl -s "https://app.asana.com/api/1.0/tasks/${{ steps.get-task-id.outputs.task_id }}/attachments" \ + -H "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ + --form "file=@${asana_dsyms_path};type=application/zip" - # - name: Upload debug symbols to Asana - # if: github.event.inputs.asana-task-url + # - name: Send Mattermost message # env: - # ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} + # WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + # DESTINATION: ${{ steps.destination.outputs.destination }} # run: | - # asana_dsyms_path="${{ github.workspace }}/DuckDuckGo-${{ env.app_version }}-dSYM.zip" - # mv -f "${{ env.dsyms_path }}" "$asana_dsyms_path" + # export MM_USER_HANDLE=$(base64 -d <<< ${{ secrets.MM_HANDLES_BASE64 }} | jq ".${{ github.actor }}" | tr -d '"') - # curl -s "https://app.asana.com/api/1.0/tasks/${{ steps.get-task-id.outputs.task_id }}/attachments" \ - # -H "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ - # --form "file=@${asana_dsyms_path};type=application/zip" - - - name: Send Mattermost message - env: - WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} - DESTINATION: ${{ steps.destination.outputs.destination }} - run: | - export MM_USER_HANDLE=$(base64 -d <<< ${{ secrets.MM_HANDLES_BASE64 }} | jq ".${{ github.actor }}" | tr -d '"') - - if [[ -z "${MM_USER_HANDLE}" ]]; then - echo "Mattermost user handle not known for ${{ github.actor }}, skipping sending message" - else + # if [[ -z "${MM_USER_HANDLE}" ]]; then + # echo "Mattermost user handle not known for ${{ github.actor }}, skipping sending message" + # else - curl -s -H 'Content-type: application/json' \ - -d "$(envsubst < ./scripts/assets/appstore-release-mm-template.json)" \ - ${{ secrets.MM_WEBHOOK_URL }} - fi + # curl -s -H 'Content-type: application/json' \ + # -d "$(envsubst < ./scripts/assets/appstore-release-mm-template.json)" \ + # ${{ secrets.MM_WEBHOOK_URL }} + # fi From 5463dbdea3f05a4f559feefd2be90c7cace78bed Mon Sep 17 00:00:00 2001 From: Graeme Arthur <2030310+graeme@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:45:14 +0200 Subject: [PATCH 03/30] Remove branch check for now --- .github/workflows/alpha.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 03adc1efa8..b3e50cf690 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -25,13 +25,13 @@ jobs: # INPUT_DESTINATION=${{ github.event.inputs.destination }} # echo "destination=${INPUT_DESTINATION:-"appstore"}" >> $GITHUB_OUTPUT - - name: Assert develop branch - run: | - case "${{ github.ref }}" in - *develop/*) ;; - *hotfix/*) ;; - *) echo "👎 Not a release or hotfix branch"; exit 1 ;; - esac + # - name: Assert develop branch + # run: | + # case "${{ github.ref }}" in + # *develop/*) ;; + # graeme/ios-nightly-builds) ;; + # *) echo "👎 Not develop branch"; exit 1 ;; + # esac - name: Register SSH keys for access to certificates uses: webfactory/ssh-agent@v0.7.0 From 9f95c4e8604f44ba2a1e29bcbecd73e4203854da Mon Sep 17 00:00:00 2001 From: Graeme Arthur <2030310+graeme@users.noreply.github.com> Date: Fri, 7 Jul 2023 13:46:48 +0200 Subject: [PATCH 04/30] Increment build number --- .github/workflows/alpha.yml | 43 ++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index b3e50cf690..0f49a0cc4d 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -74,28 +74,31 @@ jobs: APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} run: | - bundle exec fastlane release_alpha app_version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" -# echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV -# echo "app_version=${app_version}" >> $GITHUB_ENV - - - name: Upload dSYMs artifact - uses: actions/upload-artifact@v3 - with: - name: DuckDuckGo-alpha-dSYM-${{ env.app_version }} - path: ${{ env.dsyms_path }} - - - name: Upload debug symbols to Asana - if: github.event.inputs.asana-task-url - env: - ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} - run: | - asana_dsyms_path="${{ github.workspace }}/DuckDuckGo-${{ env.app_version }}-dSYM.zip" - mv -f "${{ env.dsyms_path }}" "$asana_dsyms_path" + bundle exec fastlane increment_build_number_for_version: app_version + bundle exec fastlane release_alpha + build_version="cat DuckDuckGo.xcodeproj/project.pbxproj | grep -m1 'CURRENT_PROJECT_VERSION' | cut -d'=' -f2 | tr -d ';' | tr -d ' '" + echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV + echo "app_version=${app_version}" >> $GITHUB_ENV + echo "build_version=${build_version}" >> $GITHUB_ENV + + # - name: Upload dSYMs artifact + # uses: actions/upload-artifact@v3 + # with: + # name: DuckDuckGo-alpha-dSYM-${{ env.app_version }} + # path: ${{ env.dsyms_path }} + + # - name: Upload debug symbols to Asana + # if: github.event.inputs.asana-task-url + # env: + # ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} + # run: | + # asana_dsyms_path="${{ github.workspace }}/DuckDuckGo-${{ env.app_version }}(${{ env.app_version }})-dSYM.zip" + # mv -f "${{ env.dsyms_path }}" "$asana_dsyms_path" - curl -s "https://app.asana.com/api/1.0/tasks/${{ steps.get-task-id.outputs.task_id }}/attachments" \ - -H "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ - --form "file=@${asana_dsyms_path};type=application/zip" + # curl -s "https://app.asana.com/api/1.0/tasks/${{ steps.get-task-id.outputs.task_id }}/attachments" \ + # -H "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ + # --form "file=@${asana_dsyms_path};type=application/zip" # - name: Send Mattermost message # env: From 7115fea6f5663a31f98358ef6ac23408ec429dea Mon Sep 17 00:00:00 2001 From: Graeme Arthur <2030310+graeme@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:12:02 +0200 Subject: [PATCH 05/30] Remove pesky whitespace --- .github/workflows/alpha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 0f49a0cc4d..533e9e45f7 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -75,7 +75,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} run: | app_version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" - bundle exec fastlane increment_build_number_for_version: app_version + bundle exec fastlane increment_build_number_for_version:app_version bundle exec fastlane release_alpha build_version="cat DuckDuckGo.xcodeproj/project.pbxproj | grep -m1 'CURRENT_PROJECT_VERSION' | cut -d'=' -f2 | tr -d ';' | tr -d ' '" echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV From fc3a6ee215e3410d117efa9e0bef9ee15231c84b Mon Sep 17 00:00:00 2001 From: Graeme Arthur <2030310+graeme@users.noreply.github.com> Date: Fri, 7 Jul 2023 15:34:55 +0200 Subject: [PATCH 06/30] Remove build number incrementation for now --- .github/workflows/alpha.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 533e9e45f7..704e9d7fd7 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -75,7 +75,6 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} run: | app_version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" - bundle exec fastlane increment_build_number_for_version:app_version bundle exec fastlane release_alpha build_version="cat DuckDuckGo.xcodeproj/project.pbxproj | grep -m1 'CURRENT_PROJECT_VERSION' | cut -d'=' -f2 | tr -d ';' | tr -d ' '" echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV From 6061ac1ecd7f06cf9ccc952a21b3e5d5e60850d6 Mon Sep 17 00:00:00 2001 From: Graeme Arthur <2030310+graeme@users.noreply.github.com> Date: Fri, 7 Jul 2023 15:35:26 +0200 Subject: [PATCH 07/30] Remove accidentally commited wrong beta group --- .github/workflows/alpha.yml | 16 ---------------- fastlane/Fastfile | 3 +-- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 704e9d7fd7..35b21f1020 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -98,19 +98,3 @@ jobs: # curl -s "https://app.asana.com/api/1.0/tasks/${{ steps.get-task-id.outputs.task_id }}/attachments" \ # -H "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ # --form "file=@${asana_dsyms_path};type=application/zip" - - # - name: Send Mattermost message - # env: - # WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} - # DESTINATION: ${{ steps.destination.outputs.destination }} - # run: | - # export MM_USER_HANDLE=$(base64 -d <<< ${{ secrets.MM_HANDLES_BASE64 }} | jq ".${{ github.actor }}" | tr -d '"') - - # if [[ -z "${MM_USER_HANDLE}" ]]; then - # echo "Mattermost user handle not known for ${{ github.actor }}, skipping sending message" - # else - - # curl -s -H 'Content-type: application/json' \ - # -d "$(envsubst < ./scripts/assets/appstore-release-mm-template.json)" \ - # ${{ secrets.MM_WEBHOOK_URL }} - # fi diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 68ba69d71e..26899fc2b7 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -126,8 +126,7 @@ lane :release_beta do build_release upload_to_testflight( - api_key: get_api_key, - groups: "iOS Daily Testers" + api_key: get_api_key ) end From 8e34b75429bb386b7e53e045d3b033d3ec93d1a7 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 24 Aug 2023 17:35:31 +0200 Subject: [PATCH 08/30] Add alphaExportOptions --- alphaExportOptions.plist | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 alphaExportOptions.plist diff --git a/alphaExportOptions.plist b/alphaExportOptions.plist new file mode 100644 index 0000000000..9f949f40ac --- /dev/null +++ b/alphaExportOptions.plist @@ -0,0 +1,23 @@ + + + + + teamID + HKE973VLUW + method + app-store + provisioningProfiles + + com.duckduckgo.mobile.ios.alpha + match AppStore com.duckduckgo.mobile.ios.alpha + com.duckduckgo.mobile.ios.alpha.ShareExtension + match AppStore com.duckduckgo.mobile.ios.alpha.ShareExtension + com.duckduckgo.mobile.ios.alpha.OpenAction2 + match AppStore com.duckduckgo.mobile.ios.alpha.OpenAction2 + com.duckduckgo.mobile.ios.alpha.Widgets + match AppStore com.duckduckgo.mobile.ios.alpha.Widgets + com.duckduckgo.mobile.ios.alpha.NetworkExtension + match AppStore com.duckduckgo.mobile.ios.alpha.NetworkExtension + + + From a242c583d787b4610c47d7d7e1b1d4615b093a81 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 24 Aug 2023 17:36:10 +0200 Subject: [PATCH 09/30] Add and update appropriate Fastlane lanes --- fastlane/Fastfile | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 26899fc2b7..01b5e9c6d0 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,6 +18,7 @@ lane :sync_signing_adhoc do |options| do_sync_signing(options) end +desc 'Fetches and updates certificates and provisioning profiles for Alpha distribution' lane :sync_signing_alpha do |options| do_sync_signing(options) end @@ -86,11 +87,6 @@ lane :adhoc do |options| end end -desc 'Makes Alpha release build and uploads it to App Store Connect (TestFlight)' -lane :alpha do |options| -# TODO -end - desc 'Makes App Store release build and uploads it to App Store Connect' lane :release_appstore do |options| build_release(options) @@ -130,13 +126,13 @@ lane :release_beta do ) end -desc 'Makes alpha build and uploads it to TestFlight' -lane :release_alpha do +desc 'Makes Alpha release build and uploads it to TestFlight' +lane :release_alpha do |options| build_release upload_to_testflight( api_key: get_api_key, - groups: "iOS Daily Testers" + groups: options[:groups] ) end @@ -180,6 +176,18 @@ private_lane :build_release do |options| ) end +private_lane :build_alpha do |options| + sync_signing_alpha(options) + + build_app( + export_method: "app-store", + configuration: "Alpha", + scheme: "DuckDuckGo", + export_options: "alphaExportOptions.plist", + derived_data_path: "DerivedData" + ) +end + private_lane :get_api_key do has_api_key = [ "APPLE_API_KEY_ID", From feeee3120bd4fca8eb140abe86dd2ddec2644f7b Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 24 Aug 2023 17:36:40 +0200 Subject: [PATCH 10/30] Update alpha.yml since changes on develop / ASC --- .github/workflows/alpha.yml | 59 +++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 35b21f1020..ee8cb6c576 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -1,35 +1,39 @@ name: Make TestFlight Alpha Build on: - pull_request: + workflow_dispatch: branches: - develop - - graeme/ios-nightly-builds + - graeme/ios-nightly-builds # TODO: Remove this before merging #- '!develop' # filter out PRs matching that pattern - types: [closed] + inputs: + destination: + description: "TestFlight Group" + required: true + default: "Latest Alpha Group" + type: string push: - branches: [ develop, graeme/ios-nightly-builds ] + branches: [ graeme/ios-nightly-builds ] jobs: - make-release: + make-alpha: if: github.event.action == 0 || github.event.pull_request.merged == true # empty string returns 0; for case when workflow is triggered manually runs-on: macos-13 name: Make TestFlight Alpha Build steps: - # - name: Set destination output - # id: destination - # run: | - # INPUT_DESTINATION=${{ github.event.inputs.destination }} - # echo "destination=${INPUT_DESTINATION:-"appstore"}" >> $GITHUB_OUTPUT + - name: Set destination output + id: destination + run: | + INPUT_DESTINATION=${{ github.event.inputs.destination }} + echo "destination=${INPUT_DESTINATION}" >> $GITHUB_OUTPUT - # - name: Assert develop branch + # - name: Assert develop branch TODO: Uncomment before merging # run: | # case "${{ github.ref }}" in # *develop/*) ;; - # graeme/ios-nightly-builds) ;; # *) echo "👎 Not develop branch"; exit 1 ;; # esac @@ -75,26 +79,25 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} run: | app_version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" - bundle exec fastlane release_alpha + bundle exec fastlane release_alpha groups:${{ steps.destination.outputs.destination }} build_version="cat DuckDuckGo.xcodeproj/project.pbxproj | grep -m1 'CURRENT_PROJECT_VERSION' | cut -d'=' -f2 | tr -d ';' | tr -d ' '" echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV echo "app_version=${app_version}" >> $GITHUB_ENV echo "build_version=${build_version}" >> $GITHUB_ENV - # - name: Upload dSYMs artifact - # uses: actions/upload-artifact@v3 - # with: - # name: DuckDuckGo-alpha-dSYM-${{ env.app_version }} - # path: ${{ env.dsyms_path }} + - name: Upload dSYMs artifact + uses: actions/upload-artifact@v3 + with: + name: DuckDuckGo-Alpha-dSYM-${{ env.app_version }} + path: ${{ env.dsyms_path }} - # - name: Upload debug symbols to Asana - # if: github.event.inputs.asana-task-url - # env: - # ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} - # run: | - # asana_dsyms_path="${{ github.workspace }}/DuckDuckGo-${{ env.app_version }}(${{ env.app_version }})-dSYM.zip" - # mv -f "${{ env.dsyms_path }}" "$asana_dsyms_path" + - name: Upload debug symbols to Asana + env: + ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} + run: | + asana_dsyms_path="${{ github.workspace }}/DuckDuckGo-Alpha-${{ env.app_version }}(${{ env.app_version }})-dSYM.zip" + mv -f "${{ env.dsyms_path }}" "$asana_dsyms_path" - # curl -s "https://app.asana.com/api/1.0/tasks/${{ steps.get-task-id.outputs.task_id }}/attachments" \ - # -H "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ - # --form "file=@${asana_dsyms_path};type=application/zip" + curl -s "https://app.asana.com/0/0/1205344386326139/f/attachments" \ + -H "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ + --form "file=@${asana_dsyms_path};type=application/zip" From 263a708c30d7e13ce1a0ece73cd51e935ddd0212 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 24 Aug 2023 17:36:55 +0200 Subject: [PATCH 11/30] Add a nightly deployment to the right group --- .github/workflows/nightly.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ad5c8bec9d..6e5d77bf08 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -94,3 +94,8 @@ jobs: with: report_paths: unittests.xml + deploy-alpha: + name: Deploy Nightly Alpha Build + uses: ./.github/workflows/alpha.yml + with: + destination: "Nightly Alpha Group" From 48a442b2f7513f6839ac4b96e49446e0991bec47 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 24 Aug 2023 17:38:29 +0200 Subject: [PATCH 12/30] build the correct release!!! --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 01b5e9c6d0..45c86f4595 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -128,7 +128,7 @@ end desc 'Makes Alpha release build and uploads it to TestFlight' lane :release_alpha do |options| - build_release + build_alpha upload_to_testflight( api_key: get_api_key, From 40b97a23a2a842b46ddce7038bf2ed136371fa3c Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 24 Aug 2023 18:15:10 +0200 Subject: [PATCH 13/30] Fix groups option passing --- .github/workflows/alpha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index ee8cb6c576..24ea303c39 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -79,7 +79,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} run: | app_version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" - bundle exec fastlane release_alpha groups:${{ steps.destination.outputs.destination }} + bundle exec fastlane release_alpha groups:"${{ steps.destination.outputs.destination }}" build_version="cat DuckDuckGo.xcodeproj/project.pbxproj | grep -m1 'CURRENT_PROJECT_VERSION' | cut -d'=' -f2 | tr -d ';' | tr -d ' '" echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV echo "app_version=${app_version}" >> $GITHUB_ENV From ac9de9ac2cb53a1e5cfbc1eccce5296281795161 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 24 Aug 2023 18:42:41 +0200 Subject: [PATCH 14/30] Update Matchfile for build_alpha lane --- fastlane/Matchfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fastlane/Matchfile b/fastlane/Matchfile index de59777a19..c20fafeb23 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -19,7 +19,10 @@ for_lane :adhoc do end for_lane :sync_signing_alpha do - type "appstore" + app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] +end + +for_lane :build_alpha do app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end From 94655983569d685533be197070e543c0c3b5a24b Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 24 Aug 2023 19:16:58 +0200 Subject: [PATCH 15/30] Another stab in the dark of the Matchfile --- fastlane/Matchfile | 14 ++++++++------ fastlane/README.md | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/fastlane/Matchfile b/fastlane/Matchfile index c20fafeb23..218469b18a 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -4,10 +4,17 @@ git_branch "ios" platform "ios" type "appstore" -app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] generate_apple_certs false template_name "Default Web Browser iOS (Dist)" +for_lane :sync_signing do + app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] +end + +for_lane :build_release do + app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] +end + for_lane :sync_signing_adhoc do type "adhoc" force_for_new_devices true @@ -25,8 +32,3 @@ end for_lane :build_alpha do app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end - -for_lane :alpha do - type "appstore" - app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] -end diff --git a/fastlane/README.md b/fastlane/README.md index 9733c1e6d0..6e4acf39fc 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -35,7 +35,7 @@ Fetches and updates certificates and provisioning profiles for Ad-Hoc distributi [bundle exec] fastlane sync_signing_alpha ``` -Fetches and updates certificates and provisioning profiles for Alpha TestFlight distribution +Fetches and updates certificates and provisioning profiles for Alpha distribution ### adhoc @@ -45,14 +45,6 @@ Fetches and updates certificates and provisioning profiles for Alpha TestFlight Makes Ad-Hoc build with a specified name in a given directory -### alpha - -```sh -[bundle exec] fastlane alpha -``` - -Makes Alpha release build and uploads it to App Store Connect (TestFlight) - ### release_appstore ```sh @@ -69,14 +61,22 @@ Makes App Store release build and uploads it to App Store Connect Updates App Store metadata -### release_testflight +### release_beta ```sh -[bundle exec] fastlane release_testflight +[bundle exec] fastlane release_beta ``` Makes App Store release build and uploads it to TestFlight +### release_alpha + +```sh +[bundle exec] fastlane release_alpha +``` + +Makes Alpha release build and uploads it to TestFlight + ### increment_build_number_for_version ```sh From 3e270cf682a8a03db94a7916d2104dff194f1af3 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 24 Aug 2023 19:31:06 +0200 Subject: [PATCH 16/30] Try similar approach to adhoc --- fastlane/Fastfile | 37 ++++++++++++++++++++++++++++++++++++- fastlane/Matchfile | 14 ++++++-------- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 45c86f4595..d862847e85 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -177,8 +177,43 @@ private_lane :build_release do |options| end private_lane :build_alpha do |options| - sync_signing_alpha(options) + # Workaround for match + gym failing at build phase https://forums.swift.org/t/xcode-14-beta-code-signing-issues-when-spm-targets-include-resources/59685/32 + if is_ci + configurations = [ + { + targets: ["DuckDuckGo"], + profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha" + }, + { + targets: ["ShareExtension"], + profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha.ShareExtension" + }, + { + targets: ["OpenAction"], + profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha.OpenAction2" + }, + { + targets: ["WidgetsExtension"], + profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha.Widgets" + }, + { + targets: ["PacketTunnelProvider"], + profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha.NetworkExtension" + } + ] + configurations.each do |config| + update_code_signing_settings( + use_automatic_signing: false, + build_configurations: ["Alpha"], + code_sign_identity: "iPhone Distribution", + **config + ) + end + end + + sync_signing_alpha(options) + build_app( export_method: "app-store", configuration: "Alpha", diff --git a/fastlane/Matchfile b/fastlane/Matchfile index 218469b18a..c20fafeb23 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -4,17 +4,10 @@ git_branch "ios" platform "ios" type "appstore" +app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] generate_apple_certs false template_name "Default Web Browser iOS (Dist)" -for_lane :sync_signing do - app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] -end - -for_lane :build_release do - app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] -end - for_lane :sync_signing_adhoc do type "adhoc" force_for_new_devices true @@ -32,3 +25,8 @@ end for_lane :build_alpha do app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end + +for_lane :alpha do + type "appstore" + app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] +end From 321824fe93203d38f361ca9c0a5899459bcf12fd Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 25 Aug 2023 11:48:08 +0200 Subject: [PATCH 17/30] Fix typo in alpha profile definitions --- fastlane/Fastfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d862847e85..bc57f3bb8c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -182,23 +182,23 @@ private_lane :build_alpha do |options| configurations = [ { targets: ["DuckDuckGo"], - profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha" + profile_name: "match AppStore Hoc com.duckduckgo.mobile.ios.alpha" }, { targets: ["ShareExtension"], - profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha.ShareExtension" + profile_name: "match AppStore com.duckduckgo.mobile.ios.alpha.ShareExtension" }, { targets: ["OpenAction"], - profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha.OpenAction2" + profile_name: "match AppStore com.duckduckgo.mobile.ios.alpha.OpenAction2" }, { targets: ["WidgetsExtension"], - profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha.Widgets" + profile_name: "match AppStore com.duckduckgo.mobile.ios.alpha.Widgets" }, { targets: ["PacketTunnelProvider"], - profile_name: "match AdHoc com.duckduckgo.mobile.ios.alpha.NetworkExtension" + profile_name: "match AppStore com.duckduckgo.mobile.ios.alpha.NetworkExtension" } ] @@ -213,7 +213,7 @@ private_lane :build_alpha do |options| end sync_signing_alpha(options) - + build_app( export_method: "app-store", configuration: "Alpha", From 331948aef25c0ef6897a66de4d1f42bbc8ea353d Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 25 Aug 2023 14:45:22 +0200 Subject: [PATCH 18/30] Try explicitly syncing alpha signing from GHA --- .github/workflows/alpha.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 24ea303c39..f945814913 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -79,6 +79,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} run: | app_version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" + bundle exec fastlane sync_signing_alpha bundle exec fastlane release_alpha groups:"${{ steps.destination.outputs.destination }}" build_version="cat DuckDuckGo.xcodeproj/project.pbxproj | grep -m1 'CURRENT_PROJECT_VERSION' | cut -d'=' -f2 | tr -d ';' | tr -d ' '" echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV From 1394a9e51f2b28f5fa2bc0e4e7f749988d8106a8 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Wed, 6 Sep 2023 17:56:35 +0200 Subject: [PATCH 19/30] Actually pass the options to build_alpha --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index bc57f3bb8c..0650ba34ee 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -128,7 +128,7 @@ end desc 'Makes Alpha release build and uploads it to TestFlight' lane :release_alpha do |options| - build_alpha + build_alpha(options) upload_to_testflight( api_key: get_api_key, From 596a84954519c23e1b769c7a1e46bdf0289b9d8e Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Wed, 6 Sep 2023 17:57:34 +0200 Subject: [PATCH 20/30] Move the app_identifier definition into for_lane only --- fastlane/Matchfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fastlane/Matchfile b/fastlane/Matchfile index c20fafeb23..445b231df7 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -4,16 +4,17 @@ git_branch "ios" platform "ios" type "appstore" -app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] generate_apple_certs false template_name "Default Web Browser iOS (Dist)" for_lane :sync_signing_adhoc do + app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :adhoc do + app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end @@ -26,7 +27,6 @@ for_lane :build_alpha do app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end -for_lane :alpha do - type "appstore" - app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] +for_lane :build_release do + app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] end From f2c09555dea398262a925d44781dc93ba5bdc3ee Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Wed, 6 Sep 2023 18:19:08 +0200 Subject: [PATCH 21/30] Create alpha scheme --- .../xcschemes/DuckDuckGo-Alpha.xcscheme | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 DuckDuckGo.xcodeproj/xcshareddata/xcschemes/DuckDuckGo-Alpha.xcscheme diff --git a/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/DuckDuckGo-Alpha.xcscheme b/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/DuckDuckGo-Alpha.xcscheme new file mode 100644 index 0000000000..ab41c0e9a0 --- /dev/null +++ b/DuckDuckGo.xcodeproj/xcshareddata/xcschemes/DuckDuckGo-Alpha.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From a60202f1549ef2cb1972e27049d6e6cbb1ae7fe6 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Wed, 6 Sep 2023 18:20:16 +0200 Subject: [PATCH 22/30] Pass alpha scheme to build --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0650ba34ee..f05fb589a1 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -217,7 +217,7 @@ private_lane :build_alpha do |options| build_app( export_method: "app-store", configuration: "Alpha", - scheme: "DuckDuckGo", + scheme: "DuckDuckGo-Alpha", export_options: "alphaExportOptions.plist", derived_data_path: "DerivedData" ) From fb98f6ae04392d1709e7819ec98b62dbe893b0c8 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Thu, 7 Sep 2023 12:00:05 +0200 Subject: [PATCH 23/30] Disable fastlane formatting --- .github/workflows/alpha.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index f945814913..87c40fa8c2 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -79,9 +79,8 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} run: | app_version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" - bundle exec fastlane sync_signing_alpha - bundle exec fastlane release_alpha groups:"${{ steps.destination.outputs.destination }}" - build_version="cat DuckDuckGo.xcodeproj/project.pbxproj | grep -m1 'CURRENT_PROJECT_VERSION' | cut -d'=' -f2 | tr -d ';' | tr -d ' '" + FASTLANE_DISABLE_OUTPUT_FORMAT=true bundle exec fastlane release_alpha groups:"${{ steps.destination.outputs.destination }}" + build_version="cat DuckDuckGo.xcodeproj/project.pbxproj | grep -m1 'CURRENT_PROJ ECT_VERSION' | cut -d'=' -f2 | tr -d ';' | tr -d ' '" echo "dsyms_path=${{ github.workspace }}/DuckDuckGo.app.dSYM.zip" >> $GITHUB_ENV echo "app_version=${app_version}" >> $GITHUB_ENV echo "build_version=${build_version}" >> $GITHUB_ENV From 0a27746e148011cfbb71fef26d78eacac5fad0d7 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 8 Sep 2023 11:50:35 +0200 Subject: [PATCH 24/30] Explicitly call sync_code_signing with params --- fastlane/Fastfile | 46 +++++++++++----------------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c135497d26..21db1d2da7 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,7 +20,17 @@ end desc 'Fetches and updates certificates and provisioning profiles for Alpha distribution' lane :sync_signing_alpha do |options| - do_sync_signing(options) + sync_code_signing( + api_key: get_api_key, + username: get_username(options), + readonly: is_ci, + app_identifier: ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"], + storage_mode: "git", + git_url: "git@github.com:duckduckgo/Apple-certificates.git", + git_branch: "ios", + platform: "ios", + verbose: true + ) end desc 'Makes Ad-Hoc build with a specified name in a given directory' @@ -180,40 +190,6 @@ end private_lane :build_alpha do |options| # Workaround for match + gym failing at build phase https://forums.swift.org/t/xcode-14-beta-code-signing-issues-when-spm-targets-include-resources/59685/32 - if is_ci - configurations = [ - { - targets: ["DuckDuckGo"], - profile_name: "match AppStore Hoc com.duckduckgo.mobile.ios.alpha" - }, - { - targets: ["ShareExtension"], - profile_name: "match AppStore com.duckduckgo.mobile.ios.alpha.ShareExtension" - }, - { - targets: ["OpenAction"], - profile_name: "match AppStore com.duckduckgo.mobile.ios.alpha.OpenAction2" - }, - { - targets: ["WidgetsExtension"], - profile_name: "match AppStore com.duckduckgo.mobile.ios.alpha.Widgets" - }, - { - targets: ["PacketTunnelProvider"], - profile_name: "match AppStore com.duckduckgo.mobile.ios.alpha.NetworkExtension" - } - ] - - configurations.each do |config| - update_code_signing_settings( - use_automatic_signing: false, - build_configurations: ["Alpha"], - code_sign_identity: "iPhone Distribution", - **config - ) - end - end - sync_signing_alpha(options) build_app( From b2f1da753074b28eeade31c5860b44b4d73e2cbd Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 8 Sep 2023 14:36:47 +0200 Subject: [PATCH 25/30] Try adding another Matchfile lane handler + prints --- fastlane/Fastfile | 27 ++++++++++++++------------- fastlane/Matchfile | 10 ++++++++++ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 21db1d2da7..56f0fc554d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,17 +20,19 @@ end desc 'Fetches and updates certificates and provisioning profiles for Alpha distribution' lane :sync_signing_alpha do |options| - sync_code_signing( - api_key: get_api_key, - username: get_username(options), - readonly: is_ci, - app_identifier: ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"], - storage_mode: "git", - git_url: "git@github.com:duckduckgo/Apple-certificates.git", - git_branch: "ios", - platform: "ios", - verbose: true - ) + println("Fastfile: Sync signing alpha") + do_sync_signing(options) + # sync_code_signing( + # api_key: get_api_key, + # username: get_username(options), + # readonly: is_ci, + # app_identifier: ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"], + # storage_mode: "git", + # git_url: "git@github.com:duckduckgo/Apple-certificates.git", + # git_branch: "ios", + # platform: "ios", + # verbose: true + # ) end desc 'Makes Ad-Hoc build with a specified name in a given directory' @@ -189,7 +191,6 @@ private_lane :build_release do |options| end private_lane :build_alpha do |options| - # Workaround for match + gym failing at build phase https://forums.swift.org/t/xcode-14-beta-code-signing-issues-when-spm-targets-include-resources/59685/32 sync_signing_alpha(options) build_app( @@ -238,7 +239,7 @@ private_lane :do_sync_signing do |options| sync_code_signing( api_key: get_api_key, username: get_username(options), - readonly: is_ci && !is_adhoc + readonly: is_ci && !is_adhoc ) end diff --git a/fastlane/Matchfile b/fastlane/Matchfile index 445b231df7..78c0899bd8 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -8,25 +8,35 @@ generate_apple_certs false template_name "Default Web Browser iOS (Dist)" for_lane :sync_signing_adhoc do + println("Matchfile: Sync signing adhoc") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :adhoc do + println("Matchfile: adhoc") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :sync_signing_alpha do + println("Matchfile: Sync signing alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_alpha do + println("Matchfile: Build alpha") + app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] +end + +for_lane :release_alpha do + println("Matchfile: Release alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_release do + println("Matchfile: Build release") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] end From f172d68fdff1ee76c978bf59890c7f44a1d9edb6 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 8 Sep 2023 14:48:59 +0200 Subject: [PATCH 26/30] Fix prints --- fastlane/Matchfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fastlane/Matchfile b/fastlane/Matchfile index 78c0899bd8..5ddf60dbff 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -8,35 +8,35 @@ generate_apple_certs false template_name "Default Web Browser iOS (Dist)" for_lane :sync_signing_adhoc do - println("Matchfile: Sync signing adhoc") + puts "Matchfile: Sync signing adhoc" app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :adhoc do - println("Matchfile: adhoc") + puts "Matchfile: adhoc" app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :sync_signing_alpha do - println("Matchfile: Sync signing alpha") + puts "Matchfile: Sync signing alpha" app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_alpha do - println("Matchfile: Build alpha") + puts "Matchfile: Build alpha" app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :release_alpha do - println("Matchfile: Release alpha") + puts "Matchfile: Release alpha" app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_release do - println("Matchfile: Build release") + puts "Matchfile: Build release" app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] end From ede11a10ab2fd85529ff782ed79f059c4663cd1d Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 8 Sep 2023 14:57:29 +0200 Subject: [PATCH 27/30] Revert "Fix prints" This reverts commit f172d68fdff1ee76c978bf59890c7f44a1d9edb6. --- fastlane/Matchfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fastlane/Matchfile b/fastlane/Matchfile index 5ddf60dbff..78c0899bd8 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -8,35 +8,35 @@ generate_apple_certs false template_name "Default Web Browser iOS (Dist)" for_lane :sync_signing_adhoc do - puts "Matchfile: Sync signing adhoc" + println("Matchfile: Sync signing adhoc") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :adhoc do - puts "Matchfile: adhoc" + println("Matchfile: adhoc") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :sync_signing_alpha do - puts "Matchfile: Sync signing alpha" + println("Matchfile: Sync signing alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_alpha do - puts "Matchfile: Build alpha" + println("Matchfile: Build alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :release_alpha do - puts "Matchfile: Release alpha" + println("Matchfile: Release alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_release do - puts "Matchfile: Build release" + println("Matchfile: Build release") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] end From 0e5210addd75cea7c25b10c619076bc58f6045d0 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 8 Sep 2023 14:58:49 +0200 Subject: [PATCH 28/30] Fix prints again? --- fastlane/Fastfile | 2 +- fastlane/Matchfile | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 56f0fc554d..4af15207bf 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,7 +20,7 @@ end desc 'Fetches and updates certificates and provisioning profiles for Alpha distribution' lane :sync_signing_alpha do |options| - println("Fastfile: Sync signing alpha") + println(message: "Fastfile: Sync signing alpha") do_sync_signing(options) # sync_code_signing( # api_key: get_api_key, diff --git a/fastlane/Matchfile b/fastlane/Matchfile index 78c0899bd8..316e16a398 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -8,35 +8,35 @@ generate_apple_certs false template_name "Default Web Browser iOS (Dist)" for_lane :sync_signing_adhoc do - println("Matchfile: Sync signing adhoc") + println(message: "Matchfile: Sync signing adhoc") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :adhoc do - println("Matchfile: adhoc") + println(message: "Matchfile: adhoc") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :sync_signing_alpha do - println("Matchfile: Sync signing alpha") + println(message: "Matchfile: Sync signing alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_alpha do - println("Matchfile: Build alpha") + println(message: "Matchfile: Build alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :release_alpha do - println("Matchfile: Release alpha") + println(message: "Matchfile: Release alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_release do - println("Matchfile: Build release") + println(message: "Matchfile: Build release") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] end From df5540f102af970353d084e795d0217af2e3fdc6 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 8 Sep 2023 15:05:35 +0200 Subject: [PATCH 29/30] Seriously just print something... --- fastlane/Matchfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fastlane/Matchfile b/fastlane/Matchfile index 316e16a398..9faacf2b60 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -8,35 +8,35 @@ generate_apple_certs false template_name "Default Web Browser iOS (Dist)" for_lane :sync_signing_adhoc do - println(message: "Matchfile: Sync signing adhoc") + puts(message: "Matchfile: Sync signing adhoc") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :adhoc do - println(message: "Matchfile: adhoc") + puts(message: "Matchfile: adhoc") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :sync_signing_alpha do - println(message: "Matchfile: Sync signing alpha") + puts(message: "Matchfile: Sync signing alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_alpha do - println(message: "Matchfile: Build alpha") + puts(message: "Matchfile: Build alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :release_alpha do - println(message: "Matchfile: Release alpha") + puts(message: "Matchfile: Release alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :build_release do - println(message: "Matchfile: Build release") + puts(message: "Matchfile: Build release") app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] end From 097206e25ec5f8b1c4bdf48f1c8b8d62c7f43afa Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 8 Sep 2023 15:25:40 +0200 Subject: [PATCH 30/30] Finally actually figured it out? --- fastlane/Fastfile | 12 ------------ fastlane/Matchfile | 17 +---------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 4af15207bf..d9ac47458d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,19 +20,7 @@ end desc 'Fetches and updates certificates and provisioning profiles for Alpha distribution' lane :sync_signing_alpha do |options| - println(message: "Fastfile: Sync signing alpha") do_sync_signing(options) - # sync_code_signing( - # api_key: get_api_key, - # username: get_username(options), - # readonly: is_ci, - # app_identifier: ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"], - # storage_mode: "git", - # git_url: "git@github.com:duckduckgo/Apple-certificates.git", - # git_branch: "ios", - # platform: "ios", - # verbose: true - # ) end desc 'Makes Ad-Hoc build with a specified name in a given directory' diff --git a/fastlane/Matchfile b/fastlane/Matchfile index 9faacf2b60..400b1ffebc 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -4,39 +4,24 @@ git_branch "ios" platform "ios" type "appstore" +app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] generate_apple_certs false template_name "Default Web Browser iOS (Dist)" for_lane :sync_signing_adhoc do - puts(message: "Matchfile: Sync signing adhoc") - app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :adhoc do - puts(message: "Matchfile: adhoc") - app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] type "adhoc" force_for_new_devices true end for_lane :sync_signing_alpha do - puts(message: "Matchfile: Sync signing alpha") - app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] -end - -for_lane :build_alpha do - puts(message: "Matchfile: Build alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end for_lane :release_alpha do - puts(message: "Matchfile: Release alpha") app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] end - -for_lane :build_release do - puts(message: "Matchfile: Build release") - app_identifier ["com.duckduckgo.mobile.ios", "com.duckduckgo.mobile.ios.ShareExtension", "com.duckduckgo.mobile.ios.OpenAction2", "com.duckduckgo.mobile.ios.Widgets", "com.duckduckgo.mobile.ios.NetworkExtension"] -end