-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (28 loc) · 748 Bytes
/
Copy pathpublish.yml
File metadata and controls
37 lines (28 loc) · 748 Bytes
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
name: Publish to pub.dev
on:
push:
tags:
- 'v*.*.*'
jobs:
publish:
name: Publish Package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install dependencies
run: flutter pub get
- name: Analyze
run: dart analyze --fatal-infos
- name: Run tests
run: flutter test
- name: Setup pub.dev credentials
run: |
mkdir -p ~/.config/dart
echo '${{ secrets.PUB_CREDENTIALS }}' > ~/.config/dart/pub-credentials.json
- name: Publish to pub.dev
run: dart pub publish --force