Skip to content

Workflow file for this run

name: Build and Release iOS App
on:
push:
branches:
- main
jobs:
build-ios:
name: Build iOS app
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # Use a supported Java distribution
java-version: '12.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.0'
channel: 'stable' # Can be 'beta', 'dev', or 'master'
- name: Install dependencies
run: flutter pub get
- name: Build iOS app
run: flutter build ios --release --no-codesign
# '--no-codesign' is used for building without code signing.
# For actual distribution, proper code signing is required.
########################################################
## Package the app as an .ipa and create a release ##
########################################################
- name: Package .ipa file
run: |
mkdir Payload
cp -r build/ios/iphoneos/Runner.app Payload/Runner.app
zip -r app.ipa Payload
# This packages the Runner.app into an .ipa file
- uses: ncipollo/release-action@v1
with:
name: "Automated iOS Release"
artifacts: "app.ipa"
allowUpdates: "true"
generateReleaseNotes: false
tag: "automated"
body: |
This is an automated release, triggered by a recent push.
This may or may not be stable, so please have a look at the stable release(s).
Android-Build-and-Release:
name: Testing build for android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '12.0'
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # or: 'beta', 'dev' or 'master'
- name: Running pub get to fetch dependencies
run: flutter pub get
- name: Building for android
run: flutter build apk
###################################################
## Release the built apk as an automated release ##
###################################################
- uses: ncipollo/release-action@v1
with:
name: "Automated Android Release"
artifacts: "./build/app/outputs/flutter-apk/app-release.apk"
allowUpdates: "true"
generateReleaseNotes: false
tag: "automated"
body: |
This is an automated release, triggered by a recent push.
This may or may not be stable, so please have a look at the stable release(s).
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}