Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 23 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ jobs:

- name: Checkout sources
uses: actions/checkout@v2

- name: Cache Cargo
id: cache-Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -34,16 +45,12 @@ jobs:
toolchain: stable
override: true
components: rustfmt

- name: Cache Cargo
- name: Cache Cargo Make
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-plugins

- name: Install Cargo Make
uses: actions-rs/cargo@v1
Expand All @@ -58,8 +65,9 @@ jobs:
channel: 'stable'

- name: Run Flutter pub get
run: flutter pub get

run: |
flutter pub get
echo "$FLUTTER_HOME/bin" >> $GITHUB_PATH
- name: Set up JDK 1.8 (Android only)
uses: actions/setup-java@v1
if: matrix.os == 'ubuntu-latest'
Expand Down Expand Up @@ -90,13 +98,13 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android

- name: Run cargo make android
- name: Run cargo make ffigen
if: matrix.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: make
args: android
args: ffigen

- name: Build APK (Fat, Debug)
if: matrix.os == 'ubuntu-latest'
Expand All @@ -106,41 +114,14 @@ jobs:
if: matrix.os == 'macos-latest'
run: rustup target add aarch64-apple-ios x86_64-apple-ios

- name: Run cargo make ios
- name: Run cargo make ffigen-ios
if: matrix.os == 'macos-latest'
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: make
args: ios
args: ffigen-ios

- name: Build iOS App (Simulator, Debug)
if: matrix.os == 'macos-latest'
run: flutter build ios --debug --no-codesign --simulator --no-sound-null-safety

- name: Create Release (Android)
id: create_release
if: matrix.os == 'ubuntu-latest'
uses: ChanTsune/release-with-commit@v2.1.0
with:
regexp: "Release (\\d+([.]\\d+)*)\n*((\\s|\\S)+)"
regexp_options: 'us'
release_name: 'version $1'
tag_name: 'v$1'
body: '$3'
draft: false
prerelease: false
env:
GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}'

- name: Upload Release (Android)
id: upload-release-asset
if: matrix.os == 'ubuntu-latest' && steps.create_release.outputs.created == 'true'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/app/outputs/flutter-apk/app-debug.apk
asset_name: apk-debug.apk
asset_content_type: application/octet-stream
run: flutter build ios --debug --no-codesign --simulator --no-sound-null-safety
Loading