File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
.github/action/publish_dart_package Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Flutter package to pub.dev
2+ description : Publish your Flutter package to pub.dev
3+
4+ inputs :
5+ working-directory :
6+ description : directory with-in the repository where the package is located (if not in the repository root)
7+ required : false
8+
9+ runs :
10+ using : " composite"
11+ steps :
12+ - name : 📚 Git Checkout
13+ uses : actions/checkout@v4
14+ - name : 🐦 Setup Dart
15+ uses : dart-lang/setup-dart@v1
16+
17+ - name : 🪪 Get Id Token
18+ uses : actions/github-script@v6
19+ with :
20+ script : |
21+ let pub_token = await core.getIDToken('https://pub.dev')
22+ core.exportVariable('PUB_TOKEN', pub_token)
23+
24+ - name : 📢 Authenticate
25+ shell : ${{ inputs.shell }}
26+ run : dart pub token add https://pub.dev --env-var PUB_TOKEN
27+
28+ - name : 📦 Install dependencies
29+ shell : ${{ inputs.shell }}
30+ run : dart pub get
31+ working-directory : ${{ inputs.working-directory }}
32+
33+ # - name: 🌵 Dry Run
34+ # shell: ${{ inputs.shell }}
35+ # run: dart pub publish --dry-run
36+ # working-directory: ${{ inputs.working-directory }}
37+
38+ - name : 📢 Publish
39+ shell : ${{ inputs.shell }}
40+ run : flutter pub publish -f
41+ working-directory : ${{ inputs.working-directory }}
You can’t perform that action at this time.
0 commit comments