Skip to content

Bump: Web build number #17

Bump: Web build number

Bump: Web build number #17

# This GitHub action runs on configured demand.
#
# This workflow:
# - Installs dart and flutter
# - Uses the latest 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.
# - Build Playground only, use these steps:
# - Flutter clean.
# - Flutter build web app, in release mode and with canvaskit renderer.
# - Deploy each built Web App to GitHub pages.
name: Deploy_Playground_Netlify
on:
push:
branches: [master]
paths-ignore:
- "**.md"
jobs:
flutter_tests:
name: "Analyze and test package, then build and deploy Playground only"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
# Themes playground - Build and deploy to Netlify
- name: "Themes playground START BUILD - Flutter clean before build"
run: flutter clean && cd example && flutter clean
- name: "Themes playground WEB WASM-GC release build"
run: cd example && flutter build web --wasm --release -no-strip-wasm -t lib/example5_themes_playground/main.dart
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: './example/build/web'
production-branch: master
production-deploy: true
netlify-config-path: './example/netlify.toml'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy to Netlify from GitHub Actions"
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 10