lemmur-app-android/.github/workflows/ci.yml

80 lines
1.8 KiB
YAML
Raw Normal View History

2020-08-02 19:26:57 +02:00
name: ci
on:
push:
tags:
- "v*.*.*"
branches: [master]
pull_request:
branches: [master]
jobs:
2020-10-25 13:57:30 +01:00
CI:
name: CI
2020-08-02 19:26:57 +02:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: Get dependencies
run: flutter pub get
- name: Run lints
run: flutter analyze
2020-09-19 00:06:12 +02:00
- name: Run dartfmt
run: dartfmt --dry-run --set-exit-if-changed .
2020-08-02 19:26:57 +02:00
- name: Run tests
run: flutter test
2020-10-25 13:57:30 +01:00
- name: Android build
2020-08-02 19:26:57 +02:00
run: flutter build apk --split-per-abi
2020-10-25 13:57:30 +01:00
linux-build:
name: Linux build
needs: CI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'krawieck/lemmur'
steps:
- uses: subosito/flutter-action@v1
with:
channel: "dev"
- name: Get additional dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev
- name: Enable linux support
run: |
flutter config --enable-linux-desktop
- name: Linux build
run: |
flutter build linux
cd build/linux/release/
zip -r linux.zip *
2020-10-25 13:57:30 +01:00
release:
name: Release
needs: linux-build
2020-10-25 13:57:30 +01:00
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'krawieck/lemmur'
steps:
2020-08-02 19:26:57 +02:00
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
build/app/outputs/apk/release/*.apk
build/linux/release/linux.zip
2020-08-02 19:26:57 +02:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}