generated from marchdev-tk/dart_package_template
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (35 loc) · 1.1 KB
/
dart_build.yml
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
name: build
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
environment: ${{ inputs.environment }}
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Setup Dart'
uses: dart-lang/setup-dart@v1.6.0
- name: 'Get Packages'
run: dart pub get
- name: Activate coverage package
run: dart pub global activate coverage
- name: Collect coverage in json
run: mkdir coverage & dart run test --coverage=./coverage
- name: Convert coverage to lcov
run: dart pub global run coverage:format_coverage --report-on=lib --report-on=example --report-on=bin -l -o ./coverage/lcov.info -i ./coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
file: ./coverage/lcov.info
name: codecov-mdamount
- name: 'Dry Run Publishing'
run: dart pub publish --dry-run
- name: 'Publish Artifact'
run: dart pub publish --force