Update build
This commit is contained in:
parent
4cdbf08a06
commit
5745a98e98
|
|
@ -1,52 +0,0 @@
|
|||
name: Build Web - NEXT
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build-next:
|
||||
name: Build Web - NEXT
|
||||
env:
|
||||
commit_secret: ${{secrets.commit_secret}}
|
||||
commit_email: ${{secrets.commit_email}}
|
||||
commit_name: ${{secrets.commit_name}}
|
||||
api_secret: ${{secrets.api_secret}}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: subosito/flutter-action@v1
|
||||
with:
|
||||
channel: 'dev'
|
||||
- name: Setup Flutter
|
||||
run: |
|
||||
flutter doctor -v
|
||||
cp pubspec.next.yaml pubspec.yaml
|
||||
rm pubspec.lock
|
||||
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 Hosted App
|
||||
run: |
|
||||
flutter build web --web-renderer html --release
|
||||
|
||||
sed -i '/index.html/d' build/web/flutter_service_worker.js
|
||||
|
||||
git config --global user.email ${{secrets.commit_email}}
|
||||
git config --global user.name ${{secrets.commit_name}}
|
||||
|
||||
git clone https://${{secrets.commit_secret}}@github.com/invoiceninja/invoiceninja.git
|
||||
cd invoiceninja
|
||||
|
||||
git checkout v5-develop
|
||||
cp ../build/web/main.dart.js ./public/main.next.dart.js
|
||||
git add .
|
||||
git commit -m 'New admin portal - Next [hosted]'
|
||||
git push
|
||||
cd ..
|
||||
Loading…
Reference in New Issue