Skip to content

v1.16.0

v1.16.0 #179

name: Build and publish web
on:
# Enable manual run
workflow_dispatch:
# Verify build succeeds on pull requests
pull_request:
# Verify build succeeds for tag events matching v*, i.e. v1.0.0, v20.15.10
push:
tags:
- "v*"
# Build & deploy for published releases
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v1
# with:
# channel: beta
- name: Get packages
run: flutter pub get
- name: Run build_runner
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Test build succeeds
if: github.event.action != 'published'
run: flutter build -v web --release
- name: Build and publish web version to GitHub Pages
if: github.event_name == 'release' && github.event.action == 'published'
uses: bluefireteam/flutter-gh-pages@v7
# baseHref must be included if the site is not going to be running
# at a subdomain, for example: myapp.example.com
#
# For example if the url was example.com/myapp then the
# baseHref should be: /myapp/
# with:
# baseHref: /myapp/