Merge pull request #44 from bloedboemmel/Dependency-Update #21
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: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
- '.github/**' | |
workflow_run: | |
workflows: ["Receive PR"] | |
types: | |
- completed | |
env: | |
JAVA_VERSION: "11.x" | |
FLUTTER_VERSION: '3.7.5' | |
FLUTTER_CHANNEL: "stable" | |
PROPERTIES_PATH: "./android/key.properties" | |
jobs: | |
flutter_test: | |
name: Run Flutter assigned build appbundle | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: ${{env.JAVA_VERSION}} | |
- uses: subosito/flutter-action@v1 | |
with: | |
channel: ${{env.FLUTTER_CHANNEL}} | |
flutter-version: ${{env.FLUTTER_VERSION}} | |
# Creating the key.properties file | |
- run: | | |
echo keyPassword=\${{ secrets.KEY_STORE }} > ${{env.PROPERTIES_PATH}} | |
echo storePassword=\${{ secrets.KEY_PASSWORD }} >> ${{env.PROPERTIES_PATH}} | |
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ${{env.PROPERTIES_PATH}} | |
echo storeFile=../keystore.jks >> ${{env.PROPERTIES_PATH}} | |
# Decoding base64 key into a file | |
- run: echo "${{ secrets.KEYSTORE }}" | base64 --decode > android/keystore.jks | |
# Get dependencies and make assigned appbundle | |
- run: | | |
flutter pub get | |
flutter build appbundle | |
# Make appbundle downloadable | |
- name: Upload artefato | |
uses: actions/upload-artifact@v2 | |
with: | |
name: appbundle | |
path: build/app/outputs/bundle/release | |
- run: flutter build apk | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: release-apk | |
path: build/app/outputs/apk/release/app-release.apk | |
- if: github.ref == 'refs/heads/main' | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SECRET }} | |
packageName: com.pickypal.android | |
releaseFiles: build/app/outputs/bundle/release/app-release.aab | |
track: production | |
whatsNewDirectory: distribution/whatsnew |