-
Notifications
You must be signed in to change notification settings - Fork 16
44 lines (35 loc) · 1.13 KB
/
publish.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
name: Publish Dart Package
on:
release:
types: [published]
jobs:
test:
name: 🧪 Test Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 🔧 Setup Dart SDK
uses: dart-lang/setup-dart@v1.5.0
- name: 🧪 Run Tests
run: dart test
publish:
name: 📦 Publish package
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v3
- name: 🔧 Setup Dart SDK
uses: dart-lang/setup-dart@v1.5.0
- name: ⏬ Get depdendencies
run: dart pub get
- name: ⚙ Setup pub credentials
shell: bash
env:
PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
PUB_DEV_PUBLISH_TOKEN_ENDPOINT: ${{ secrets.PUB_DEV_PUBLISH_TOKEN_ENDPOINT }}
PUB_DEV_PUBLISH_EXPIRATION: ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }}
run: |
sh ./pub_login.sh
- name: 🚀 Publish
run: dart pub publish -n && dart pub publish -f