Skip to content

Merge branch 'develop' #1228

Merge branch 'develop'

Merge branch 'develop' #1228

Workflow file for this run

name: Build Web
on:
push:
branches:
- master
jobs:
build-main:
name: Build Web - MAIN
env:
commit_secret: ${{secrets.commit_secret}}
commit_email: ${{secrets.commit_email}}
commit_name: ${{secrets.commit_name}}
app_sentry: ${{secrets.app_sentry}}
api_secret: ${{secrets.api_secret}}
sentry_auth_token: ${{secrets.sentry_auth_token}}
sentry_org: ${{secrets.sentry_org}}
sentry_project: ${{secrets.sentry_project}}
sentry_url: ${{secrets.sentry_url}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.7.5'
#channel: 'stable'
- name: Install Sentry
run: |
curl -sL https://sentry.io/get-cli/ | bash
- name: Setup Flutter
run: |
flutter doctor -v
flutter pub get
flutter config --enable-web
- name: Prepare App
run: |
cp lib/.env.dart.example lib/.env.dart
sed -i 's/secret/${{secrets.api_secret}}/g' lib/.env.dart
echo "const FLUTTER_VERSION = const <String, String>" > lib/flutter_version.dart
flutter --version --machine >> lib/flutter_version.dart
echo ";" >> lib/flutter_version.dart
- name: Build Profile App
run: |
flutter build web --profile
git clone https://${{secrets.commit_secret}}@github.com/invoiceninja/invoiceninja.git invoiceninja_profile
cd invoiceninja_profile
git checkout v5-develop
cp ../build/web/main.dart.js ./public/main.profile.dart.js
git add .
git commit -m 'Admin Portal - Profile'
git push
cd ..
- name: Build Selfhosted App
run: |
cp lib/utils/oauth.dart.foss lib/utils/oauth.dart
cp lib/utils/app_review.dart.foss lib/utils/app_review.dart
cp lib/ui/app/upgrade_dialog.dart.foss lib/ui/app/upgrade_dialog.dart
cp lib/ui/app/pinput.dart.foss lib/ui/app/pinput.dart
cp pubspec.foss.yaml pubspec.yaml
flutter pub get
flutter build web
git clone https://${{secrets.commit_secret}}@github.com/invoiceninja/invoiceninja.git invoiceninja_foss
cd invoiceninja_foss
git checkout v5-develop
cp ../build/web/main.dart.js ./public/main.foss.dart.js
cp ../build/web/main.dart.js.map ./public/main.foss.dart.js.map
git add .
git commit -m 'Admin Portal - Selfhosted'
git push