-
-
Notifications
You must be signed in to change notification settings - Fork 510
82 lines (64 loc) · 1.75 KB
/
Copy pathbuild-firebase.yaml
File metadata and controls
82 lines (64 loc) · 1.75 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: build firebase
on:
workflow_dispatch:
push:
tags:
- "firebase-v[0-9]+.[0-9]+.[0-9]+*"
branches: [develop, main]
paths:
- "flutter_cache_manager_firebase/**"
- ".github/workflows/build-firebase.yaml"
pull_request:
branches: [develop, main]
paths:
- "flutter_cache_manager_firebase/**"
- ".github/workflows/build-firebase.yaml"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
FLUTTER_VERSION: "3.44.4"
jobs:
quality:
name: Format, Analyze & Test
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: ./flutter_cache_manager_firebase
steps:
- uses: actions/checkout@v7
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Download dependencies
run: flutter pub get
- name: Run Dart Format
run: dart format --set-exit-if-changed .
- name: Run Flutter Analyzer
run: flutter analyze
- name: Run unit tests
run: flutter test --coverage
publish_cache_manager_firebase:
if: ${{ github.ref_type == 'tag' }}
name: Publish Cache Manager Firebase
permissions:
id-token: write
contents: read
needs: [quality]
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: ./flutter_cache_manager_firebase
steps:
- uses: actions/checkout@v7
- name: Set up Dart
uses: dart-lang/setup-dart@v1
- name: Publish package
run: dart pub publish -v -f