Test Build 1 #2
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: Test Build 1 | |
on: | |
workflow_dispatch: | |
jobs: | |
build-apk: | |
environment: | |
name: Android | |
url: ${{ steps.deployments.outputs.alias }} | |
name: Build APK and Create release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Download Assets | |
uses: valitydev/action-download-file@v1 | |
with: | |
url: 'https://i.postimg.cc/xcVdwHxS/splash.png' | |
target-path: './assets/splash_icon' | |
- name: Download Assets | |
uses: valitydev/action-download-file@v1 | |
with: | |
url: 'https://i.postimg.cc/xcVdwHxS/splash-dark.png' | |
target-path: './assets/splash_icon' | |
- name: Download Assets | |
uses: valitydev/action-download-file@v1 | |
with: | |
url: 'https://i.postimg.cc/xcVdwHxS/splash-a12.png' | |
target-path: './assets/splash_icon' | |
- name: Download Assets | |
uses: valitydev/action-download-file@v1 | |
with: | |
url: 'https://i.postimg.cc/xcVdwHxS/splash-a12-dark.png' | |
target-path: './assets/splash_icon' | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.22.2' | |
channel: 'stable' | |
- name: Install Global Dependencies | |
run: dart pub global activate flutter_native_splash | |
- name: Create Splash Screen | |
run: dart run flutter_native_splash:create --path=splash.yaml | |
- name: Build apk | |
run: flutter build apk --split-per-abi | |
- name: Retrieve Release Version | |
id: versionstep | |
run: | | |
VERSION=$(more pubspec.yaml | grep version: | cut -d ' ' -f2)-dev | |
echo "::set-output name=VERSION::$VERSION" | |
- name: Create a Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/app/outputs/apk/release/*.apk" | |
token: ${{ secrets.GH_TOKEN }} | |
tag: ${{ steps.versionstep.outputs.VERSION }} | |
commit: ${{ github.sha }} | |
allowUpdates: true |