Skip to content

Run release CI on tag push #1

Run release CI on tag push

Run release CI on tag push #1

Workflow file for this run

name: Create Release
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
tags:
- '*'
release:
types: [ published ]
jobs:
build-apk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
- name: Build APK
run: |
cd ./
flutter pub get
flutter build apk --release
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: release-apk
path: ./build/app/outputs/flutter-apk/app-release.apk
if-no-files-found: error
- name: Upload APK to release
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.CI_TOKEN }}
file: ./build/app/outputs/flutter-apk/app-release.apk
file_glob: true
tag: ${{ github.ref }}
overwrite: true
build-ipa:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
architecture: x64
- name: Build iOS
run: |
flutter pub get
flutter build ios --release --verbose --no-codesign
- name: Create IPA
run: |
mkdir ./payload/
mv ./build/ios/iphoneos/Runner.app/ ./payload
zip -qq -r -9 ./app-release.ipa ./payload
- name: Upload IPA
uses: actions/upload-artifact@v2
with:
name: release-ipa
path: ./app-release.ipa
if-no-files-found: error
- name: Upload IPA to release
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.CI_TOKEN }}
file: ./app-release.ipa
file_glob: true
tag: ${{ github.ref }}
overwrite: true