Created
September 2, 2024 23:02
-
-
Save kawainime/55461fe5549d3e9289a7d59f801bae1c to your computer and use it in GitHub Desktop.
Flutter
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
# This is a basic workflow to help you get started with Actions | |
name: Pre-Release | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on pull request events but only for the main branch | |
pull_request: | |
branches: [main] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "Build and Pre-Release APK" | |
releases: | |
name: Build and Pre-Release APK | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
- name: Get packages | |
run: flutter packages get | |
- name: Analyze | |
run: flutter analyze | |
- name: Build APK | |
run: flutter build apk --split-per-abi | |
- name: Pre-release APK by uploading it to Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: APKS | |
path: build/app/outputs/flutter-apk/*.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment