Skip to content

Update workflow to 17 #63

Update workflow to 17

Update workflow to 17 #63

Workflow file for this run

name: Flutter CI
# This workflow is triggered on pushes to the repository.
on:
workflow_dispatch:
push:
branches:
- main #replace origin with main once active development ends.
# on: push # Default will running for every branch.
jobs:
build:
# This job will run on ubuntu virtual machine
runs-on: ubuntu-latest
steps:
# Setup Java environment in order to build the Android app.
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '17'
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.KEYSTORE }}
run: |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${TMP_KEYSTORE_FILE_PATH}"
touch "${TMP_KEYSTORE_FILE_PATH}"/key.jks
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/key.jks
echo "${TMP_KEYSTORE_FILE_PATH}"
# Setup the flutter environment.
- uses: subosito/flutter-action@v2
with:
channel: master
# 'dev', 'alpha', default to: 'stable'
# flutter-version: '1.12.x' # you can also specify exact version of flutter
# Get flutter dependencies.
- run: flutter pub get
# Build apk.
- name: Build apk
run: flutter build apk --release
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
# Upload generated apk to the artifacts.
- name: Upload apk
uses: actions/upload-artifact@v3
with:
name: release-apk
path: build/app/outputs/apk/release/app-release.apk