From b47ad588088e2e8ef187c0c8d421bb16c2e3a8d6 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 27 Sep 2024 15:51:49 -0400 Subject: [PATCH] Add build workflow --- .github/workflows/build.yml | 65 +++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..478a965 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,65 @@ +name: Build android and ios +on: + push: + branches: + - main + pull_request: + +jobs: + build: + name: Build ios and android packages + runs-on: macos-latest + + steps: + - name: Set up Go 1.22 + uses: actions/setup-go@v4 + with: + go-version: "1.22" + + - uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: '17' + + - name: Install flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.24.1' + + - name: Check out code + uses: actions/checkout@v3 + + + - name: install dependencies + env: + TOKEN: ${{ secrets.MACHINE_USER_PAT }} + run: | + go install golang.org/x/mobile/cmd/gomobile@latest + gomobile init + + flutter pub get + + touch env.sh + +# - name: Build iOS +# env: +# TOKEN: ${{ secrets.MACHINE_USER_PAT }} +# MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} +# run: | +# cd ios +# pod install +# fastlane build +# cd - +# +# # verify that the github token didn't make it into the output +# mkdir -p build/app/test-ios +# cp ios/MobileNebula.ipa build/app/test-ios +# cd build/app/test-ios +# unzip MobileNebula.ipa +# if find . | xargs strings 2>/dev/null | grep -qF "${TOKEN}" ; then +# echo "Token found in iOS build" +# exit 1 +# fi + + - name: Build Android + run: flutter build appbundle --debug