Files
lunasea/.github/workflows/build_web.yml
2022-04-02 10:59:30 -04:00

63 lines
1.5 KiB
YAML

name: 'Build Web'
on:
workflow_call:
inputs:
build_number:
required: true
type: string
secrets:
FIREBASE_OPTIONS:
required: true
jobs:
build:
name: CanvasKit
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download Source Files
uses: actions/download-artifact@v3
with:
name: lib
path: ${{ github.workspace }}/lib
- name: Download Localization Files
uses: actions/download-artifact@v3
with:
name: localization
path: ${{ github.workspace }}/assets/localization
- name: Install Secrets
working-directory: ${{ github.workspace }}
run: |
echo ${{ secrets.FIREBASE_OPTIONS }} | base64 --decode > lib/firebase_options.dart
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: ${{ github.sha }}
- name: Setup Flutter
working-directory: ${{ github.workspace }}
run: |
flutter pub get
- name: Build LunaSea
working-directory: ${{ github.workspace }}
run: |
flutter build web --web-renderer canvaskit --release
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web-canvaskit
path: ${{ github.workspace }}/build/web