-
Notifications
You must be signed in to change notification settings - Fork 106
67 lines (51 loc) · 1.62 KB
/
flutter_web-build-deploy.yml
File metadata and controls
67 lines (51 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Flutter Web deploy Example to Firebase Hosting
on:
push:
branches: [ "prod" ]
workflow_dispatch:
env:
FLUTTER_VERSION: 3.27.4
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
cache: true
- run: flutter --version
- name: Install dependencies
run: flutter pub get
- name: Enable web support
run: flutter config --enable-web
- name: Create web build with release mode
run: cd ./example; flutter build web --release --target=lib/main.dart --output=build/web
- name: Archive Production Artifact
uses: actions/upload-artifact@v4
with:
name: web-build
path: example/build/web
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download Production Artifact
uses: actions/download-artifact@v4
with:
name: web-build
- name: Firebase Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TWILIO_VOICE_WEB }}'
channelId: live
projectId: twilio-voice-web