mirror of
https://github.com/go-vikunja/app
synced 2024-11-14 16:50:45 +00:00
feat: build app in CI (#79)
* feat: build app in CI * fix: use correct jobs format * fix: do not specify flutter version * fix(ci): simplify triggers and build files * fix: use new theme apis
This commit is contained in:
parent
b2af1b7f40
commit
edcd91d9c2
41
.github/workflows/build-unsigned-debug.yml
vendored
41
.github/workflows/build-unsigned-debug.yml
vendored
@ -1,41 +0,0 @@
|
||||
name: Flutter Build Unsigned Debug
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build-app:
|
||||
name: Build Unsigned APK
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '12.x'
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v1
|
||||
with:
|
||||
channel: stable
|
||||
|
||||
- name: Cache pub dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.FLUTTER_HOME }}/.pub-cache
|
||||
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: ${{ runner.os }}-pub-
|
||||
|
||||
- name: Download pub dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Build Debug Build
|
||||
run: flutter build apk --debug --flavor core
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: app-core-debug.apk
|
||||
path: build/app/outputs/flutter-apk/app-core-debug.apk
|
||||
compression-level: 0
|
53
.github/workflows/build.yml
vendored
53
.github/workflows/build.yml
vendored
@ -1,53 +0,0 @@
|
||||
name: Flutter Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- null-safety-migration
|
||||
|
||||
jobs:
|
||||
build-app:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '12.x'
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v1
|
||||
with:
|
||||
channel: stable
|
||||
|
||||
- name: Cache pub dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.FLUTTER_HOME }}/.pub-cache
|
||||
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: ${{ runner.os }}-pub-
|
||||
|
||||
- name: Download pub dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Download Android keystore
|
||||
id: android_keystore
|
||||
uses: timheuer/base64-to-file@v1.0.3
|
||||
with:
|
||||
fileName: key.jks
|
||||
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
|
||||
- name: Create key.properties
|
||||
run: |
|
||||
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
|
||||
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
|
||||
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
|
||||
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
|
||||
|
||||
- name: Build Debug Build
|
||||
run: flutter build apk --debug --flavor core
|
||||
|
20
.github/workflows/flutter-format.yml
vendored
20
.github/workflows/flutter-format.yml
vendored
@ -1,20 +0,0 @@
|
||||
name: Flutter Check Format
|
||||
|
||||
on:
|
||||
pull_request: {}
|
||||
push: {}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v1
|
||||
with:
|
||||
channel: stable
|
||||
- name: Check Dart Format
|
||||
run: dart format --set-exit-if-changed .
|
61
.github/workflows/flutter-release.yml
vendored
61
.github/workflows/flutter-release.yml
vendored
@ -11,55 +11,25 @@ on:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build
|
||||
name: Build and Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '12.x'
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v1
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
|
||||
- name: Flutter version
|
||||
run: flutter --version
|
||||
|
||||
- name: Cache pub dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.FLUTTER_HOME }}/.pub-cache
|
||||
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: ${{ runner.os }}-pub-
|
||||
|
||||
- name: Download pub dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Download Android keystore
|
||||
id: android_keystore
|
||||
uses: timheuer/base64-to-file@v1.0.3
|
||||
with:
|
||||
fileName: key.jks
|
||||
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
|
||||
- name: Create key.properties
|
||||
run: |
|
||||
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
|
||||
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
|
||||
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
|
||||
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
|
||||
|
||||
- name: Build Android App Bundle
|
||||
run: flutter build appbundle --flavor core
|
||||
|
||||
- name: Build Android APK
|
||||
run: flutter build apk --flavor core
|
||||
|
||||
cache: true
|
||||
# optional parameters follow
|
||||
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
||||
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
||||
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies
|
||||
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
||||
- run: flutter --version
|
||||
- run: flutter pub get
|
||||
- run: flutter build apk --debug --flavor core
|
||||
- run: flutter build appbundle --flavor core
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
@ -67,4 +37,3 @@ jobs:
|
||||
path: |
|
||||
build/app/outputs/bundle/coreRelease/app-core-release.aab
|
||||
build/app/outputs/flutter-apk/app-core-release.apk
|
||||
|
||||
|
40
.github/workflows/flutter.yml
vendored
Normal file
40
.github/workflows/flutter.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: 'Flutter Build'
|
||||
|
||||
on:
|
||||
pull_request: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-app:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
cache: true
|
||||
# optional parameters follow
|
||||
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
||||
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
||||
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies
|
||||
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
||||
- run: flutter --version
|
||||
- run: flutter pub get
|
||||
- run: flutter build apk --debug --flavor core
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
- name: Check Dart Format
|
||||
run: dart format --set-exit-if-changed .
|
@ -63,7 +63,7 @@ class _BucketTaskCardState extends State<BucketTaskCard>
|
||||
widget.task.identifier.isNotEmpty
|
||||
? '#${widget.task.identifier}'
|
||||
: '${widget.task.id}',
|
||||
style: (theme.textTheme.subtitle2 ?? TextStyle()).copyWith(
|
||||
style: (theme.textTheme.titleSmall ?? TextStyle()).copyWith(
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
|
@ -22,13 +22,13 @@ ThemeData buildVikunjaMaterialDarkTheme() {
|
||||
ThemeData _buildVikunjaTheme(ThemeData base, {bool isDark = false}) {
|
||||
return base.copyWith(
|
||||
useMaterial3: true,
|
||||
errorColor: vRed,
|
||||
primaryColor: vPrimaryDark,
|
||||
primaryColorLight: vPrimary,
|
||||
primaryColorDark: vBlueDark,
|
||||
colorScheme: base.colorScheme.copyWith(
|
||||
primary: vPrimaryDark,
|
||||
secondary: vPrimary,
|
||||
error: vRed,
|
||||
),
|
||||
floatingActionButtonTheme: base.floatingActionButtonTheme.copyWith(
|
||||
foregroundColor: vWhite,
|
||||
@ -40,7 +40,7 @@ ThemeData _buildVikunjaTheme(ThemeData base, {bool isDark = false}) {
|
||||
// title: base.textTheme.title.copyWith(
|
||||
// fontFamily: 'Quicksand',
|
||||
// ),
|
||||
button: base.textTheme.button?.copyWith(
|
||||
labelLarge: base.textTheme.labelLarge?.copyWith(
|
||||
color:
|
||||
vWhite, // This does not work, looks like a bug in Flutter: https://github.com/flutter/flutter/issues/19623
|
||||
),
|
||||
|
36
pubspec.lock
36
pubspec.lock
@ -298,10 +298,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_colorpicker
|
||||
sha256: "458a6ed8ea480eb16ff892aedb4b7092b2804affd7e046591fb03127e8d8ef8b"
|
||||
sha256: "969de5f6f9e2a570ac660fb7b501551451ea2a1ab9e2097e89475f60e07816ea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
version: "1.1.0"
|
||||
flutter_downloader:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -668,26 +668,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
|
||||
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.0"
|
||||
version: "10.0.4"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
|
||||
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
version: "3.0.3"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
|
||||
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
version: "3.0.1"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -716,10 +716,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: meta
|
||||
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
|
||||
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
version: "1.12.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1145,26 +1145,26 @@ packages:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: test
|
||||
sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f
|
||||
sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.24.9"
|
||||
version: "1.25.2"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.1"
|
||||
version: "0.7.0"
|
||||
test_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_core
|
||||
sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a
|
||||
sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.9"
|
||||
version: "0.6.0"
|
||||
timezone:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -1329,10 +1329,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
|
||||
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "13.0.0"
|
||||
version: "14.2.1"
|
||||
wakelock_plus:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -24,7 +24,7 @@ dependencies:
|
||||
petitparser: ^6.0.2
|
||||
provider: ^6.1.2
|
||||
webview_flutter: ^4.7.0
|
||||
flutter_colorpicker: ^1.0.3
|
||||
flutter_colorpicker: ^1.1.0
|
||||
flutter_keyboard_visibility: ^6.0.0
|
||||
dotted_border: ^2.1.0
|
||||
url_launcher: ^6.2.5
|
||||
|
Loading…
Reference in New Issue
Block a user