mirror of
https://github.com/go-vikunja/app
synced 2024-06-03 02:59:47 +00:00
feat(ci): build app for PRs and pushes to main (#2)
* feat(ci): build app for PRs and pushes to main * fix(ci): only build debug build in pipeline * feat(ci): always build with keys * fix(ci): don't build everything on PR
This commit is contained in:
parent
032bf1c532
commit
d778f102a7
53
.github/workflows/build.yml
vendored
Normal file
53
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
name: Flutter Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
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
|
||||
|
2
.github/workflows/flutter-release.yml
vendored
2
.github/workflows/flutter-release.yml
vendored
|
@ -21,10 +21,12 @@ jobs:
|
|||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '12.x'
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v1
|
||||
with:
|
||||
channel: stable
|
||||
|
||||
- name: Flutter version
|
||||
run: flutter --version
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user