update image location and add placeholder icon #19
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: Build flutter | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
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 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- run: flutter doctor | |
- run: flutter build apk | |
- name: Rename apk | |
id: rename_apk | |
run: | | |
apkName="ShockAlarm.apk" | |
echo "apkName=$apkName" >> $GITHUB_OUTPUT | |
mkdir -p output | |
mv build/app/outputs/flutter-apk/app-release.apk output/$apkName | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ShockAlarm-Android | |
path: output/${{ steps.rename_apk.outputs.apkName }} |