-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (34 loc) · 1.12 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
45
name: Publish to pub.dev
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: ''
# Publish using the reusable workflow from dart-lang.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format -o none --set-exit-if-changed .
- name: Analyze project source
run: dart analyze --fatal-infos
- name: Make shell script write_credentials.sh executable
run: chmod +x .github/workflows/write_credentials.sh
- name: Write down test credentials
run: ./.github/workflows/write_credentials.sh
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
- name: Run tests
run: dart test
publish:
needs: build
permissions:
id-token: write # Required for authentication using OIDC
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
# with:
# working-directory: path/to/package/within/repository