Skip to content

update github

update github #34

Workflow file for this run

on:
pull_request:
branches:
- main
- dev
types:
- closed
# push:
# branches:
# - main
# - develop
name: "Build & Release"
jobs:
build:
if: github.event.pull_request.merged == true
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 }}