File tree Expand file tree Collapse file tree 7 files changed +102
-48
lines changed
Expand file tree Collapse file tree 7 files changed +102
-48
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to pub.dev
2+ description : Publish a package to pub.dev
3+
4+ inputs :
5+ working_directory :
6+ description : Directory within the repository where the package is located (defaults to root).
7+ required : false
8+
9+ runs :
10+ using : composite
11+ steps :
12+ - name : 📚 Git Checkout
13+ uses : actions/checkout@v4
14+
15+ - name : 🎯 Setup Dart
16+ uses : dart-lang/setup-dart@v1
17+
18+ - name : 🪪 Get Token
19+ uses : actions/github-script@v6
20+ with :
21+ script : |
22+ const pub_token = await core.getIDToken('https://pub.dev')
23+ core.exportVariable('PUB_TOKEN', pub_token)
24+
25+ - name : 🔐 Authenticate
26+ shell : ${{ inputs.shell }}
27+ run : dart pub token add https://pub.dev --env-var PUB_TOKEN
28+
29+ - name : 📦 Install dependencies
30+ shell : ${{ inputs.shell }}
31+ run : dart pub get
32+ working-directory : ${{ inputs.working_directory }}
33+
34+ - name : 🌵 Dry Run
35+ shell : ${{ inputs.shell }}
36+ run : dart pub publish --dry-run
37+ working-directory : ${{ inputs.working_directory }}
38+
39+ - name : 📢 Publish
40+ shell : ${{ inputs.shell }}
41+ run : dart pub publish -f
42+ working-directory : ${{ inputs.working_directory }}
Original file line number Diff line number Diff line change 1- name : publish_dart_frog
1+ name : publish/dart_frog
22
33on :
44 push :
55 tags :
6- - " dart_frog-v*.*.*"
7- workflow_dispatch :
6+ - " dart_frog-v[0-9]+.[0-9]+.[0-9]+*"
87
98jobs :
109 publish :
10+ environment : pub.dev
11+ runs-on : ubuntu-latest
1112 permissions :
1213 id-token : write # Required for authentication using OIDC
13- uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
14- with :
15- working_directory : " packages/dart_frog"
16- secrets :
17- pub_credentials : ${{ secrets.PUB_CREDENTIALS }}
14+
15+ steps :
16+ - name : 📦 Publish
17+ uses : ./.github/actions/pub_publish
18+ with :
19+ working_directory : packages/dart_frog
Original file line number Diff line number Diff line change 1- name : publish_dart_frog_auth
1+ name : publish/dart_frog_auth
22
33on :
44 push :
55 tags :
6- - " dart_frog_auth-v*.*.*"
7- workflow_dispatch :
6+ - " dart_frog_auth-v[0-9]+.[0-9]+.[0-9]+*"
87
98jobs :
109 publish :
10+ environment : pub.dev
11+ runs-on : ubuntu-latest
1112 permissions :
1213 id-token : write # Required for authentication using OIDC
13- uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
14- with :
15- working_directory : " packages/dart_frog_auth"
16- secrets :
17- pub_credentials : ${{ secrets.PUB_CREDENTIALS }}
14+
15+ steps :
16+ - name : 📦 Publish
17+ uses : ./.github/actions/pub_publish
18+ with :
19+ working_directory : packages/dart_frog_auth
Original file line number Diff line number Diff line change 1- name : publish_dart_frog_cli
1+ name : publish/dart_frog_cli
22
33on :
44 push :
55 tags :
6- - " dart_frog_cli-v*.*.*"
7- workflow_dispatch :
6+ - " dart_frog_cli-v[0-9]+.[0-9]+.[0-9]+*"
87
98jobs :
109 publish :
10+ environment : pub.dev
11+ runs-on : ubuntu-latest
1112 permissions :
1213 id-token : write # Required for authentication using OIDC
13- uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
14- with :
15- working_directory : " packages/dart_frog_cli"
16- secrets :
17- pub_credentials : ${{ secrets.PUB_CREDENTIALS }}
14+
15+ steps :
16+ - name : 📦 Publish
17+ uses : ./.github/actions/pub_publish
18+ with :
19+ working_directory : packages/dart_frog_cli
Original file line number Diff line number Diff line change 1- name : publish_dart_frog_gen
1+ name : publish/dart_frog_gen
22
33on :
44 push :
55 tags :
6- - " dart_frog_gen-v*.*.*"
7- workflow_dispatch :
6+ - " dart_frog_gen-v[0-9]+.[0-9]+.[0-9]+*"
87
98jobs :
109 publish :
10+ environment : pub.dev
11+ runs-on : ubuntu-latest
1112 permissions :
1213 id-token : write # Required for authentication using OIDC
13- uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
14- with :
15- working_directory : " packages/dart_frog_gen"
16- secrets :
17- pub_credentials : ${{ secrets.PUB_CREDENTIALS }}
14+
15+ steps :
16+ - name : 📦 Publish
17+ uses : ./.github/actions/pub_publish
18+ with :
19+ working_directory : packages/dart_frog_gen
Original file line number Diff line number Diff line change 1- name : publish_dart_frog_test
1+ name : publish/dart_frog_test
22
33on :
44 push :
55 tags :
6- - " dart_frog_test-v*.*.*"
7- workflow_dispatch :
6+ - " dart_frog_test-v[0-9]+.[0-9]+.[0-9]+*"
87
98jobs :
109 publish :
10+ environment : pub.dev
11+ runs-on : ubuntu-latest
1112 permissions :
1213 id-token : write # Required for authentication using OIDC
13- uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
14- with :
15- working_directory : " packages/dart_frog_test"
16- secrets :
17- pub_credentials : ${{ secrets.PUB_CREDENTIALS }}
14+
15+ steps :
16+ - name : 📦 Publish
17+ uses : ./.github/actions/pub_publish
18+ with :
19+ working_directory : packages/dart_frog_test
Original file line number Diff line number Diff line change 1- name : publish_dart_frog_web_socket
1+ name : publish/dart_frog_web_socket
22
33on :
44 push :
55 tags :
6- - " dart_frog_web_socket-v*.*.*"
7- workflow_dispatch :
6+ - " dart_frog_web_socket-v[0-9]+.[0-9]+.[0-9]+*"
87
98jobs :
109 publish :
10+ environment : pub.dev
11+ runs-on : ubuntu-latest
1112 permissions :
1213 id-token : write # Required for authentication using OIDC
13- uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
14- with :
15- working_directory : " packages/dart_frog_web_socket"
16- secrets :
17- pub_credentials : ${{ secrets.PUB_CREDENTIALS }}
14+
15+ steps :
16+ - name : 📦 Publish
17+ uses : ./.github/actions/pub_publish
18+ with :
19+ working_directory : packages/dart_frog_web_socket
You can’t perform that action at this time.
0 commit comments