diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b53bb647f..56b2b293b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,9 +14,7 @@ # - Build 5 different WEB example apps using FlexColorScheme. # All examples use these steps: # - Flutter clean. -# - Flutter build web app, in release mode and with html renderer. -# - Use rpl to fix/modify the index.html file to give it the correct -# href deployment sub-folder. +# - Flutter build web app, in release mode and with canvaskit renderer. # - Deploy each built Web App to GitHub pages. name: Deploy_Web on: diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml index 4c16ea4a5..2d2e3d500 100644 --- a/.github/workflows/deploy_dev.yml +++ b/.github/workflows/deploy_dev.yml @@ -15,9 +15,7 @@ # - Build 5 different WEB example apps using FlexColorScheme. # All examples use these steps: # - Flutter clean. -# - Flutter build web app, in release mode and with html renderer. -# - Use rpl to fix/modify the index.html file to give it the correct -# href deployment sub-folder. +# - Flutter build web app, in release mode and with canvaskit renderer. # - Deploy each built Web App to GitHub pages. # For dev releases, the workflow excludes running test and uploading code # coverage data. diff --git a/.github/workflows/deploy_dev_playground.yml b/.github/workflows/deploy_dev_playground.yml new file mode 100644 index 000000000..c88f075b9 --- /dev/null +++ b/.github/workflows/deploy_dev_playground.yml @@ -0,0 +1,74 @@ +# This GitHub Action is for DEV build and WEB deploy!! +# This GitHub action typically runs on a release, when the GitHub repo is +# "published", but it is only activated manually by setting required triggers. +# +# This workflow: +# - Installs dart and flutter +# - Uses flutter stable channel. +# Consider setting up a matrix later with beta and dev included too. +# - Enables flutter web +# - Gets package dependencies +# - Runs dart analyze. +# - Show outdated packages, just added for info. +# - Verify that dart format is used by all committed code, fails if not. +# Controversial but pub.dev penalizes you if dart format is not used. +# - Build Playground only, use these steps: +# - Flutter clean. +# - Flutter build web app, in release mode and with canvaskit renderer. +# - Deploy to GitHub pages. +# For dev releases, the workflow excludes running test and uploading code +# coverage data. +name: Deploy_Dev +on: + push: + branches: [none] + paths-ignore: + - "**.md" + pull_request: + branches: [none] + paths-ignore: + - "**.md" + release: + branches: [version-8-0-0] + types: [published] + +jobs: + flutter_tests: + name: "Analyze and test package, then build and deploy 5 web apps" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Flutter and Dart SDK + uses: subosito/flutter-action@v2 + with: + channel: "stable" + - name: "Show Dart SDK version" + run: dart --version + - name: "Show Flutter SDK version" + run: flutter --version + - name: "Flutter Enable Web" + run: flutter config --enable-web + - name: "Install Flutter package dependencies" + run: flutter pub get + - name: "Analyze Dart source" + run: dart analyze + - name: "Show outdated packages" + run: flutter pub outdated + - name: "Verify that Dart formatting is used, fail if not" + run: dart format --output=none --set-exit-if-changed . + + # Example 5 Themes playground - Build and deploy + - name: "EXAMPLE-5 START BUILD - Flutter clean before build" + run: flutter clean && cd example && flutter clean + - name: "EXAMPLE-5 WEB release build" + run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/themesplayground-dev/" --release -t lib/example5_themes_playground/main.dart + - name: "EXAMPLE-5 DEPLOY to GitHub Pages repository, published on commit." + uses: dmnemec/copy_file_to_another_repo_action@v1.0.4 + env: + API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + with: + source_file: 'example/build/web/.' + destination_folder: 'flexcolorscheme/themesplayground-dev' + destination_repo: 'rydmike/rydmike.github.io' + user_email: 'm.rydstrom@gmail.com' + user_name: 'rydmike' diff --git a/.github/workflows/deploy_playground.yml b/.github/workflows/deploy_playground.yml index bf41bb312..c2c2a0e83 100644 --- a/.github/workflows/deploy_playground.yml +++ b/.github/workflows/deploy_playground.yml @@ -11,12 +11,9 @@ # Controversial but pub.dev penalizes you if dart format is not used. # - Run all tests with coverage. # - Upload code coverage output to Codecov for analysis. -# - Build Playground only -# All examples use these steps: +# - Build Playground only, use these steps: # - Flutter clean. -# - Flutter build web app, in release mode and with html renderer. -# - Use rpl to fix/modify the index.html file to give it the correct -# href deployment sub-folder. +# - Flutter build web app, in release mode and with canvaskit renderer. # - Deploy each built Web App to GitHub pages. name: Deploy_Playground on: