Merge pull request #33 from aryonuwi/test-20240209-home #27
Workflow file for this run
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
on: | |
# pull_request: | |
# branches: | |
# - main | |
# - dev | |
merge_group: | |
push: | |
branches: | |
- main | |
- dev | |
# push: | |
# branches: | |
# - main | |
# - develop | |
name: "Build & Release" | |
jobs: | |
build: | |
name: Build & Release | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up java 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.x' | |
- name: Flutter get depedency | |
run: flutter pub get | |
- name: flutter build apk debug | |
run: flutter build apk --debug | |
- name: Push to releases debug | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'dev' | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/app/outputs/apk/debug/*" | |
tag: v1.0.${{ github.run_number }}-Debug | |
token: ${{ secrets.TOKEN }} | |
- name: flutter build apk | |
run: flutter build apk | |
- name: Push to releases release | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'main' | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/app/outputs/apk/release/*" | |
tag: v1.0.${{ github.run_number }}-Debug | |
token: ${{ secrets.TOKEN }} |