Skip to content

Commit

Permalink
Update CI (roc-streaming#99)
Browse files Browse the repository at this point in the history
- add macOS and Windows
- add release job
  • Loading branch information
gavv committed Oct 9, 2024
1 parent 0acdfaa commit b145599
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 176 deletions.
File renamed without changes.
143 changes: 143 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
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 python
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install doit
run: |
pip install 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 python
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install doit
run: |
pip install doit
- name: Check manifests
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 }}
91 changes: 0 additions & 91 deletions .github/workflows/flutter_build.yml

This file was deleted.

85 changes: 0 additions & 85 deletions _temp_storage/.github/workflows/build.yaml

This file was deleted.

0 comments on commit b145599

Please sign in to comment.