Update documentation #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: default | |
on: | |
push: | |
branches: | |
- flutter | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- flutter | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 1' | |
jobs: | |
desktop: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
name: desktop/${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Install doit | |
uses: awalsh128/cache-apt-pkgs-action@v1.4.2 | |
with: | |
packages: python3-doit | |
- name: Run dart analyzer | |
run: doit lint:dart | |
- name: Run tests | |
run: doit test | |
android: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
name: android/${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Install flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Install doit | |
uses: awalsh128/cache-apt-pkgs-action@v1.4.2 | |
with: | |
packages: python3-doit | |
- name: Run dart analyzer | |
run: doit lint:dart | |
- name: Run spotless linter | |
run: doit lint:kotlin | |
- name: Build apk | |
run: doit build:apk | |
release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: [desktop, android] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Install flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Install doit | |
uses: awalsh128/cache-apt-pkgs-action@v1.4.2 | |
with: | |
packages: python3-doit | |
- name: Check version | |
run: | | |
./script/version_ctl.py check_release | |
- name: Build APK | |
env: | |
SIGNING_STORE_FILE: roc-droid.jks | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
run: | | |
echo "${{ secrets.SIGNING_STORE_BASE64 }}" | base64 -di > app/${{ env.SIGNING_STORE_FILE }} | |
doit build:apk variant=release | |
- name: Deploy APK | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
files: dist/android/release/roc-droid-*.apk | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |