-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (49 loc) · 1.77 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
46
47
48
49
50
51
52
53
54
55
name: Publish packages
on:
release:
types: [ published ]
push:
branches:
- main
pull_request:
env:
PUB_ENVIRONMENT: bot.github
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
channel: stable
- name: Setup credentials
run: |
mkdir -p ~/.pub-cache && cat <<EOF > ~/.pub-cache/credentials.json
${{ secrets.CREDENTIAL_JSON }}
EOF
- name: (prometheus_client) Install dependencies
run: dart pub get
working-directory: prometheus_client
- name: (prometheus_client) Dry-run publish
run: dart pub publish --dry-run
working-directory: prometheus_client
- name: (prometheus_client) Publish
run: dart pub publish --force
if: github.event.release
working-directory: prometheus_client
- name: (prometheus_client_shelf) Remove dependency override
run: sudo snap install yq && yq eval "del(.dependency_overrides)" --inplace pubspec.yaml
working-directory: prometheus_client_shelf
- name: (prometheus_client_shelf) Install dependencies
run: dart pub get
working-directory: prometheus_client_shelf
- # It's common that the dry-run step fails if the dependency constraint on prometheus_client is not valid and a
# newer version has to be uploaded. In that case, it's fine to ignore it.
name: (prometheus_client_shelf) Dry-run publish
run: dart pub publish --dry-run
working-directory: prometheus_client_shelf
- name: (prometheus_client_shelf) Publish
run: dart pub publish --force
if: github.event.release
working-directory: prometheus_client_shelf