Skip to content

Add setup example steps #3

Add setup example steps

Add setup example steps #3

Workflow file for this run

name: CD
env:
VERSION: 1.0.0
FORMX_FORM_ID: ${{ secrets.FORMX_FORM_ID }}
FORMX_ACCESS_TOKEN: ${{ secrets.FORMX_ACCESS_TOKEN }}
FORMX_API_HOST: ${{ secrets.FORMX_API_HOST }}
on:
push:
branches:
- main
jobs:
release-android:
runs-on: [self-hosted, linux, x64, v1]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Install appcenter CLI
uses: oursky/github-ci-support/setup-app-center@v1
- uses: oursky/github-ci-support/setup-android@v1
with:
accept-licenses: 'y'
# See gradle output to see what packages are required
packages: >-
platform-tools
tools
build-tools;34.0.0
platforms;android-34
- uses: oursky/github-ci-support/setup-flutter@v1
with:
flutter-version: "3.16.5"
- name: Install dependencies
working-directory: ./example
run: flutter pub get
- name: Setup android build configs
working-directory: ./example
run: |
echo "BUILD_VERSION=`date +%s`" >> $GITHUB_ENV
make env_to_dotenv
- name: Build example apk
working-directory: ./example/android
run: |
./gradlew assembleRelease
- name: Deploy example apk to appcenter
working-directory: ./example
run: |
yarn global add appcenter-cli
appcenter distribute release -f build/app/outputs/apk/release/app-release.apk -a Oursky/FormX-SDK-Flutter-Android-Sample --group 'Collaborators'
release-ios:
runs-on: [self-hosted, macOS, ARM64, v2]
env:
DEVELOPER_DIR: /Volumes/xcodes/Xcode-15.0.app
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: oursky/github-ci-support/setup-flutter@v1
with:
flutter-version: "3.16.5"
- name: Install dependencies
working-directory: ./example
run: flutter pub get
- name: Setup ios build configs
working-directory: ./example
run: |
echo "BUILD_VERSION=`date +%s`" >> $GITHUB_ENV
make env_to_dotenv
- name: Build & Deploy example ipa to testflight
working-directory: ./example/ios
run: |
bundle install
bundle exec fastlane app_deploy build_version:${BUILD_VERSION} version:${VERSION}