flappy bird #7
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: "Build & Release" | |
on: | |
pull_request: | |
branches: | |
- main | |
- master | |
push: | |
branches: | |
- main | |
- master | |
- develop | |
jobs: | |
build: | |
name: Build & Release | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
architecture: x64 | |
- name: Install dependencies | |
run: flutter pub get # This installs the packages specified in pubspec.yaml | |
- name: Build Android APK | |
run: flutter build apk --release --split-per-abi | |
- name: Build iOS IPA | |
run: | | |
flutter build ios --no-codesign | |
cd build/ios/iphoneos | |
mkdir Payload | |
cd Payload | |
ln -s ../Runner.app | |
cd .. | |
zip -r app.ipa Payload | |
- name: Create Release and Upload APK/IPA | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: | | |
build/app/outputs/apk/release/*.apk, | |
build/ios/iphoneos/app.ipa | |
tag: v1.0.${{ github.run_number }} | |
token: ${{ secrets.TOKEN }} |