Skip to content

Commit

Permalink
Buidl with github actions
Browse files Browse the repository at this point in the history
Add github action workflow to build flutter_assets for pi
  • Loading branch information
ada-phillips committed Mar 30, 2024
1 parent 5111499 commit 10ba532
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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}}

0 comments on commit 10ba532

Please sign in to comment.