From 10ba532f4af90edbd7f838ec3357d89ef8ed4997 Mon Sep 17 00:00:00 2001 From: Ada Phillips Date: Sat, 30 Mar 2024 14:31:13 -0400 Subject: [PATCH] Buidl with github actions Add github action workflow to build flutter_assets for pi --- .github/workflows/build.yml | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 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..eaf6770 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,53 @@ +name: Build Odyssey + +on: + push: + workflow_call: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' # or: 'beta', 'dev', 'master' (or 'main') + - run: flutter pub global activate flutterpi_tool + - run: flutterpi_tool build --arch=arm64 --cpu=pi4 --release + + + - name: Copy & Compress output + id: compress + run: | + cp target/armv7-unknown-linux-gnueabihf/release/odyssey odyssey + cp target/armv7-unknown-linux-gnueabihf/release/odyssey.yaml odyssey.yaml + cp target/armv7-unknown-linux-gnueabihf/release/apiHelper.py apiHelper.py + tar -czvf orion.tar.gz build/flutter_assets + echo "archive=$ARCHIVE" >> $GITHUB_OUTPUT + + - uses: actions/upload-artifact@v4.3.1 + with: + name: orion + path: | + orion.tar.gz + + - uses: ncipollo/release-action@v1.14.0 + if: github.ref == 'refs/heads/main' + with: + artifacts: orion.tar.gz + tag: v1 + skipIfReleaseExists: true + generateReleaseNotes: true + commit: ${{github.sha}} + - uses: ncipollo/release-action@v1.14.0 + if: github.ref != 'refs/heads/main' + with: + artifacts: orion.tar.gz + tag: BRANCH_${{github.ref_name}} + skipIfReleaseExists: false + allowUpdates: true + prerelease: true + generateReleaseNotes: true + commit: ${{github.sha}}