mirror of
https://github.com/mllrr96/Neumorphic-Calculator.git
synced 2025-08-06 19:16:03 +08:00
Add workflow to create apk,ipa files
This commit is contained in:
48
.github/workflows/mail.yaml
vendored
Normal file
48
.github/workflows/mail.yaml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
name: Build Flutter APK's and iPA files
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
architecture: x64
|
||||
cache: true
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '17'
|
||||
cache: 'gradle'
|
||||
- name: Run flutter doctor
|
||||
run: flutter doctor -v
|
||||
- name: Run pub get and build runner
|
||||
run: |
|
||||
flutter pub get
|
||||
|
||||
- name: Build APK
|
||||
run: |
|
||||
flutter build apk --release
|
||||
cd build/app/outputs/apk/release
|
||||
mv *.apk Neumorphic-Calculator-${GITHUB_REF#refs/*/}.apk
|
||||
- name: Build iPA
|
||||
run: |
|
||||
flutter build ios --release --no-codesign
|
||||
cd build/ios/iphoneos
|
||||
mkdir Payload
|
||||
cd Payload
|
||||
ln -s ../Runner.app
|
||||
cd ..
|
||||
zip -r Neumorphic-Calculator-${GITHUB_REF#refs/*/}.ipa Payload
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1.13.0
|
||||
with:
|
||||
artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/*.ipa"
|
||||
allowUpdates: true
|
Reference in New Issue
Block a user