From 5721e01d71c30295d0d198194a3924473aaf102d Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Thu, 2 May 2024 08:29:17 +0100 Subject: [PATCH] github: various fixes to workflows commit 31227e6c2e3bcd269c452e4bb7172ae11943d2bf Author: Adil Hanney Date: Thu May 2 08:20:02 2024 +0100 github: use gnu grep on macos commit de1535ffb5b7791da0ddc2f876b46f565ebc8f23 Author: Adil Hanney Date: Thu May 2 08:01:42 2024 +0100 github: fix grep text encoding on windows commit 516b918d5aac1d0f977ab053238be0e3c8d81ea5 Author: Adil Hanney Date: Thu May 2 07:59:29 2024 +0100 github: install codemagic cli with pipx commit 1d5c80fa859280bc55c79ccc7ed8bea34ec187f0 Author: Adil Hanney Date: Thu May 2 07:54:33 2024 +0100 github: install codemagic cli with pipx --- .github/workflows/ios.yml | 15 ++++++++++----- .github/workflows/macos.yml | 7 +++++-- .github/workflows/windows.yml | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index c0075c568..3fa5800a3 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -62,7 +62,9 @@ jobs: architecture: x64 - name: Install Codemagic CLI Tools - run: pip3 install codemagic-cli-tools + run: | + brew install pipx + pipx install codemagic-cli-tools - name: Setup keychain run: | @@ -82,7 +84,6 @@ jobs: - run: find . -name "Podfile" -execdir pod install \; - name: Build for iOS - id: build run: | flutter build ipa \ --dart-define=FLAVOR="App Store" \ @@ -91,7 +92,11 @@ jobs: --dart-define=DIRTY="false" \ --export-options-plist=$HOME/export_options.plist - buildName=$(grep -oP "(?<=buildName = ').*(?=')" lib/data/version.dart) + - name: Move IPA + id: move + run: | + brew install grep + buildName=$(ggrep -oP "(?<=buildName = ').*(?=')" lib/data/version.dart) export ipaPath="Saber_v${buildName}.ipa" mv $(find $(pwd) -name "*.ipa") $ipaPath echo "ipaPath=$ipaPath" >> $GITHUB_OUTPUT @@ -104,8 +109,8 @@ jobs: uses: actions/upload-artifact@v4 with: name: Saber-iOS-Archive - path: ${{ steps.build.outputs.ipaPath }} + path: ${{ steps.move.outputs.ipaPath }} - name: Publish to App Store if: ${{ startsWith(github.ref, 'refs/tags/') }} - run: app-store-connect publish --path ${{ steps.build.outputs.ipaPath }} + run: app-store-connect publish --path ${{ steps.move.outputs.ipaPath }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 248c0ea5e..43a6155b6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -62,7 +62,9 @@ jobs: architecture: x64 - name: Install Codemagic CLI Tools - run: pip3 install codemagic-cli-tools + run: | + brew install pipx + pipx install codemagic-cli-tools - name: Setup keychain run: | @@ -124,7 +126,8 @@ jobs: - name: Compress macOS build id: compress run: | - buildName=$(grep -oP "(?<=buildName = ').*(?=')" lib/data/version.dart) + brew install grep + buildName=$(ggrep -oP "(?<=buildName = ').*(?=')" lib/data/version.dart) zipName="Saber_v${buildName}.app.zip" echo "zipName=$zipName" >> $GITHUB_OUTPUT diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 872069657..6b45e0716 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -76,6 +76,7 @@ jobs: id: rename shell: bash run: | + export LC_ALL=en_US.utf8 buildName=$(grep -oP "(?<=buildName = ').*(?=')" lib/data/version.dart) installerName="SaberInstaller_v${buildName}.exe" echo "installerName=$installerName" >> $GITHUB_OUTPUT