Skip to content

Merge pull request #1411 from ardriveapp/PE-4744-release-ar-drive-app… #332

Merge pull request #1411 from ardriveapp/PE-4744-release-ar-drive-app…

Merge pull request #1411 from ardriveapp/PE-4744-release-ar-drive-app… #332

Workflow file for this run

name: 'Staging deploy'
on:
push:
branches:
- dev
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
env:
BUILD_NUMBER: ${{ github.run_number }}
RELEASE_NOTES: Staging - ${{ github.sha }}
jobs:
pre-build:
uses: ./.github/workflows/test.yml
build-web:
needs: pre-build
runs-on: ubuntu-latest
steps:
# Checkout
- uses: actions/checkout@v3
with:
persist-credentials: false
# Set Flutter version from fvm
- uses: kuhnroyal/flutter-fvm-config-action@v1
# Install Flutter
- uses: subosito/flutter-action@v2
with:
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Install script_runner
run: flutter pub global activate script_runner
- name: Build app
run: |
scr setup
flutter config --enable-web
flutter build web --dart-define=environment=staging --release
# Deploy to github pages
- uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: build/web
clean: true
build-ios:
needs: pre-build
runs-on: macos-latest
steps:
# Checkout
- uses: actions/checkout@v3
# Install Ruby
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
# Set Flutter version from fvm
- uses: kuhnroyal/flutter-fvm-config-action@v1
# Install Flutter
- uses: subosito/flutter-action@v2
with:
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Set FIREBASE_JSON env var
run: echo "FIREBASE_JSON=$RUNNER_TEMP/firebase.json" >> $GITHUB_ENV
- name: Save Firebase Service Account json
env:
FIREBASE_SERVICE_ACCOUNT_JSON: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }}
run: echo -n "$FIREBASE_SERVICE_ACCOUNT_JSON" >> $FIREBASE_JSON
- name: Install fastlane and Cocoapods
working-directory: ./ios
run: bundle install
- name: Build iOS with fastlane
env:
MATCH_GIT_PRIVATE_KEY: ${{ secrets.FASTLANE_SSH_KEY }}
MATCH_PASSWORD: ${{ secrets.FASTLANE_MATCH_PASSWORD }}
working-directory: ./ios
run: bundle exec fastlane deploy type:staging
build-android:
needs: pre-build
runs-on: ubuntu-latest
steps:
# Checkout
- uses: actions/checkout@v3
# Install Ruby
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
# Install JDK
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
# Set Flutter version from fvm
- uses: kuhnroyal/flutter-fvm-config-action@v1
# Install Flutter
- uses: subosito/flutter-action@v2
with:
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Set FIREBASE_JSON env var
run: echo "FIREBASE_JSON=$RUNNER_TEMP/firebase.json" >> $GITHUB_ENV
- name: Save Firebase Service Account json
env:
FIREBASE_SERVICE_ACCOUNT_JSON: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }}
run: echo -n "$FIREBASE_SERVICE_ACCOUNT_JSON" >> $FIREBASE_JSON
- name: Set ANDROID_SIGNING_STORE_FILE env var
run: echo "ANDROID_SIGNING_STORE_FILE=$RUNNER_TEMP/keystore.jks" >> $GITHUB_ENV
- name: Save Android Keystore file
env:
ANDROID_SIGNING_STORE: ${{ secrets.ANDROID_SIGNING_STORE }}
run: echo -n "$ANDROID_SIGNING_STORE" | base64 --decode >> $ANDROID_SIGNING_STORE_FILE
- name: Install fastlane
working-directory: ./android
run: bundle install
- name: Build Android with fastlane
env:
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }}
working-directory: ./android
run: bundle exec fastlane deploy type:staging