Skip to content

Commit

Permalink
ci: add release build
Browse files Browse the repository at this point in the history
Signed-off-by: Harry Chen <i@harrychen.xyz>
  • Loading branch information
Harry-Chen committed May 1, 2024
1 parent 08ce334 commit 372fde4
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/example-app.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
# This is a basic workflow to help you get started with Actions

name: Build Example App

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push, pull_request]

# 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"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}

strategy:
fail-fast: false
matrix:
variant: [debug, release]
include:
- variant: debug
artifact-path: build/app/outputs/apk/app-debug.apk
- variant: release
artifact-path: build/app/outputs/flutter-apk/app-release.apk

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # or: 'dev' or 'beta'
channel: 'stable'
cache: true
- run: dart pub get
- run: dart format --output=none --set-exit-if-changed .
- run: dart analyze
Expand All @@ -35,5 +37,5 @@ jobs:
working-directory: example/
- uses: actions/upload-artifact@v4
with:
name: example-apk-debug
path: example/build/app/outputs/apk/debug/app-debug.apk
name: example-apk-${{ matrix.variant }}
path: example/${{ matrix.artifact-path }}

0 comments on commit 372fde4

Please sign in to comment.