Skip to content

Commit 04a6fa8

Browse files
committed
chore(ci): per-package workflows; chore(network_debugger): drop Flutter dep and bump 0.1.2; fix(wsc_debugger): HttpOverrides types; ci: add pub publish; ignore flutter plugin files
1 parent 79c2bed commit 04a6fa8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3069
-12
lines changed

.github/workflows/dio_debugger.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: dio_debugger CI/CD
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags:
7+
- 'dio_debugger-v*'
8+
paths:
9+
- 'dart_packages/dio_debugger/**'
10+
- '.github/workflows/dio_debugger.yml'
11+
pull_request:
12+
paths:
13+
- 'dart_packages/dio_debugger/**'
14+
- '.github/workflows/dio_debugger.yml'
15+
workflow_dispatch:
16+
inputs:
17+
publish:
18+
description: 'Publish to pub.dev'
19+
required: false
20+
default: 'false'
21+
22+
permissions:
23+
contents: read
24+
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
ci:
31+
runs-on: ubuntu-latest
32+
env:
33+
PKG_DIR: dart_packages/dio_debugger
34+
PUB_ENVIRONMENT: bot.github
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: dart-lang/setup-dart@v1
38+
with:
39+
sdk: stable
40+
- name: Cache pub
41+
uses: actions/cache@v4
42+
with:
43+
path: ~/.pub-cache
44+
key: ${{ runner.os }}-pub-${{ hashFiles('dart_packages/dio_debugger/pubspec.lock', 'dart_packages/dio_debugger/pubspec.yaml') }}
45+
restore-keys: |
46+
${{ runner.os }}-pub-
47+
- name: Pub get
48+
working-directory: ${{ env.PKG_DIR }}
49+
run: dart pub get
50+
- name: Format check
51+
working-directory: ${{ env.PKG_DIR }}
52+
run: dart format --output=none --set-exit-if-changed .
53+
- name: Analyze
54+
working-directory: ${{ env.PKG_DIR }}
55+
run: dart analyze .
56+
- name: Tests
57+
working-directory: ${{ env.PKG_DIR }}
58+
shell: bash
59+
run: |
60+
if [ -d test/unit ]; then
61+
dart test test/unit -r expanded
62+
elif [ -d test ]; then
63+
dart test -r expanded
64+
else
65+
echo "No tests"
66+
fi
67+
- name: Build docs
68+
working-directory: ${{ env.PKG_DIR }}
69+
run: dart doc
70+
- name: Publish dry-run
71+
if: github.event_name != 'pull_request'
72+
working-directory: ${{ env.PKG_DIR }}
73+
run: dart pub publish --dry-run
74+
75+
publish:
76+
needs: ci
77+
runs-on: ubuntu-latest
78+
if: |
79+
github.event_name == 'workflow_dispatch' && inputs.publish == 'true' ||
80+
startsWith(github.ref, 'refs/tags/dio_debugger-v')
81+
env:
82+
PKG_DIR: dart_packages/dio_debugger
83+
PUB_ENVIRONMENT: bot.github
84+
steps:
85+
- uses: actions/checkout@v4
86+
- uses: dart-lang/setup-dart@v1
87+
with:
88+
sdk: stable
89+
- name: Pub get
90+
working-directory: ${{ env.PKG_DIR }}
91+
run: dart pub get
92+
- name: Configure pub credentials
93+
run: |
94+
mkdir -p ~/.pub-cache
95+
echo "${{ secrets.PUB_CREDENTIALS }}" > ~/.pub-cache/credentials.json
96+
- name: Publish to pub.dev
97+
working-directory: ${{ env.PKG_DIR }}
98+
run: dart pub publish --force
99+
100+
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: network_debugger CI/CD
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags:
7+
- 'network_debugger-v*'
8+
paths:
9+
- 'dart_packages/network_debugger/**'
10+
- '.github/workflows/network_debugger.yml'
11+
pull_request:
12+
paths:
13+
- 'dart_packages/network_debugger/**'
14+
- '.github/workflows/network_debugger.yml'
15+
workflow_dispatch:
16+
inputs:
17+
publish:
18+
description: 'Publish to pub.dev'
19+
required: false
20+
default: 'false'
21+
22+
permissions:
23+
contents: read
24+
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
ci:
31+
runs-on: ubuntu-latest
32+
env:
33+
PKG_DIR: dart_packages/network_debugger
34+
PUB_ENVIRONMENT: bot.github
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: dart-lang/setup-dart@v1
38+
with:
39+
sdk: stable
40+
- name: Cache pub
41+
uses: actions/cache@v4
42+
with:
43+
path: ~/.pub-cache
44+
key: ${{ runner.os }}-pub-${{ hashFiles('dart_packages/network_debugger/pubspec.lock') }}
45+
restore-keys: |
46+
${{ runner.os }}-pub-
47+
- name: Pub get
48+
working-directory: ${{ env.PKG_DIR }}
49+
run: dart pub get
50+
- name: Format check
51+
working-directory: ${{ env.PKG_DIR }}
52+
run: dart format --output=none --set-exit-if-changed .
53+
- name: Analyze
54+
working-directory: ${{ env.PKG_DIR }}
55+
run: dart analyze .
56+
- name: Tests
57+
working-directory: ${{ env.PKG_DIR }}
58+
shell: bash
59+
run: |
60+
if [ -d test/unit ]; then
61+
dart test test/unit -r expanded
62+
elif [ -d test ]; then
63+
dart test -r expanded
64+
else
65+
echo "No tests"
66+
fi
67+
- name: Build docs
68+
working-directory: ${{ env.PKG_DIR }}
69+
run: dart doc
70+
- name: Publish dry-run
71+
if: github.event_name != 'pull_request'
72+
working-directory: ${{ env.PKG_DIR }}
73+
run: dart pub publish --dry-run
74+
75+
publish:
76+
needs: ci
77+
runs-on: ubuntu-latest
78+
if: |
79+
github.event_name == 'workflow_dispatch' && inputs.publish == 'true' ||
80+
startsWith(github.ref, 'refs/tags/network_debugger-v')
81+
env:
82+
PKG_DIR: dart_packages/network_debugger
83+
PUB_ENVIRONMENT: bot.github
84+
steps:
85+
- uses: actions/checkout@v4
86+
- uses: dart-lang/setup-dart@v1
87+
with:
88+
sdk: stable
89+
- name: Pub get
90+
working-directory: ${{ env.PKG_DIR }}
91+
run: dart pub get
92+
- name: Configure pub credentials
93+
run: |
94+
mkdir -p ~/.pub-cache
95+
echo "${{ secrets.PUB_CREDENTIALS }}" > ~/.pub-cache/credentials.json
96+
- name: Publish to pub.dev
97+
working-directory: ${{ env.PKG_DIR }}
98+
run: dart pub publish --force
99+
100+
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: socket_io_debugger CI/CD
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags:
7+
- 'socket_io_debugger-v*'
8+
paths:
9+
- 'dart_packages/socket_io_debugger/**'
10+
- '.github/workflows/socket_io_debugger.yml'
11+
pull_request:
12+
paths:
13+
- 'dart_packages/socket_io_debugger/**'
14+
- '.github/workflows/socket_io_debugger.yml'
15+
workflow_dispatch:
16+
inputs:
17+
publish:
18+
description: 'Publish to pub.dev'
19+
required: false
20+
default: 'false'
21+
22+
permissions:
23+
contents: read
24+
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
ci:
31+
runs-on: ubuntu-latest
32+
env:
33+
PKG_DIR: dart_packages/socket_io_debugger
34+
PUB_ENVIRONMENT: bot.github
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: dart-lang/setup-dart@v1
38+
with:
39+
sdk: stable
40+
- name: Cache pub
41+
uses: actions/cache@v4
42+
with:
43+
path: ~/.pub-cache
44+
key: ${{ runner.os }}-pub-${{ hashFiles('dart_packages/socket_io_debugger/pubspec.lock', 'dart_packages/socket_io_debugger/pubspec.yaml') }}
45+
restore-keys: |
46+
${{ runner.os }}-pub-
47+
- name: Pub get
48+
working-directory: ${{ env.PKG_DIR }}
49+
run: dart pub get
50+
- name: Format check
51+
working-directory: ${{ env.PKG_DIR }}
52+
run: dart format --output=none --set-exit-if-changed .
53+
- name: Analyze
54+
working-directory: ${{ env.PKG_DIR }}
55+
run: dart analyze .
56+
- name: Tests
57+
working-directory: ${{ env.PKG_DIR }}
58+
shell: bash
59+
run: |
60+
if [ -d test/unit ]; then
61+
dart test test/unit -r expanded
62+
elif [ -d test ]; then
63+
dart test -r expanded
64+
else
65+
echo "No tests"
66+
fi
67+
- name: Build docs
68+
working-directory: ${{ env.PKG_DIR }}
69+
run: dart doc
70+
- name: Publish dry-run
71+
if: github.event_name != 'pull_request'
72+
working-directory: ${{ env.PKG_DIR }}
73+
run: dart pub publish --dry-run
74+
75+
publish:
76+
needs: ci
77+
runs-on: ubuntu-latest
78+
if: |
79+
github.event_name == 'workflow_dispatch' && inputs.publish == 'true' ||
80+
startsWith(github.ref, 'refs/tags/socket_io_debugger-v')
81+
env:
82+
PKG_DIR: dart_packages/socket_io_debugger
83+
PUB_ENVIRONMENT: bot.github
84+
steps:
85+
- uses: actions/checkout@v4
86+
- uses: dart-lang/setup-dart@v1
87+
with:
88+
sdk: stable
89+
- name: Pub get
90+
working-directory: ${{ env.PKG_DIR }}
91+
run: dart pub get
92+
- name: Configure pub credentials
93+
run: |
94+
mkdir -p ~/.pub-cache
95+
echo "${{ secrets.PUB_CREDENTIALS }}" > ~/.pub-cache/credentials.json
96+
- name: Publish to pub.dev
97+
working-directory: ${{ env.PKG_DIR }}
98+
run: dart pub publish --force
99+
100+

0 commit comments

Comments
 (0)