49 lines
1007 B
YAML
49 lines
1007 B
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
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
|
|
|
|
- name: Run dartfmt
|
|
run: dartfmt --dry-run --set-exit-if-changed .
|
|
|
|
- name: Run tests
|
|
run: flutter test
|
|
|
|
- name: Build APKs
|
|
run: flutter build apk --split-per-abi
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'krawieck/lemmur'
|
|
with:
|
|
files: |
|
|
build/app/outputs/apk/release/*.apk
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|