diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f1eb482 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Build + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Download Android keystore + id: android_keystore + uses: timheuer/base64-to-file@v1.0.3 + with: + fileName: upload-keystore.jks + encodedString: ${{ secrets.KEYSTORE_BASE64 }} + - name: Create key.properties + run: | + echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties + echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties + echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties + echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties + - uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: "17.x" + cache: "gradle" + - uses: subosito/flutter-action@v2 + with: + flutter-version: "3.10.2" + channel: "stable" + cache: "true" + - name: Install dependencies + run: ./fix-pub.sh + - name: Build + run: filcnaplo/build.sh + - name: Upload Android Release + uses: actions/upload-artifact@v2 + with: + name: android-release + path: build/outputs/flutter-apk/app-release.apk