Skip to content

Update experience

Update experience #43

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Web Build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
# pull_request:
# branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Export Release Timestamp
run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%M.%S')" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Flutter action
# You may pin to the exact commit or the version.
# uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8
uses: subosito/[email protected]
with:
# The Flutter build release channel
channel: stable
- name: Flutter doctor
run: flutter doctor -v
- name: Fetch dependencies
run: flutter pub get
# - name: Run Tests
# run: flutter test
- name: Build Web
run: |
flutter build web --release
cd build/web
zip -r web-app.zip .
- name: Release Web App
uses: ncipollo/release-action@v1
with:
tag: ${{ env.APP_VERSION }}
name: ${{ env.APP_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: 'build/web/web-app.zip'