File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to pub.dev
2+
3+ # # Caller of this workflow should use it as follows:
4+ # # jobs:
5+ # # publish:
6+ # # uses: dart-lang/setup-dart/.github/workflows/publish.yml
7+ # # # with:
8+ # # # working-directory: path/to/sub/directory
9+
10+ on :
11+ workflow_call :
12+ inputs :
13+ environment :
14+ description : if specified, the workflow is required to be run in this environment (with additional approvals)
15+ required : false
16+ type : string
17+ working-directory :
18+ description : directory with-in the repository where the package is located (if not in the repository root)
19+ required : false
20+ type : string
21+
22+ jobs :
23+ publish :
24+ name : ' Publish to pub.dev'
25+ environment : ${{ inputs.environment }}
26+ permissions :
27+ id-token : write # This is required for requesting the JWT
28+ runs-on : ubuntu-latest
29+ steps :
30+ - uses : actions/checkout@v3
31+ - uses : dart-lang/setup-dart@main
32+ - name : Install dependencies
33+ run : dart pub get
34+ working-directory : ${{ inputs.working-directory }}
35+ - name : Analyze
36+ run : dart analyze
37+ working-directory : ${{ inputs.working-directory }}
38+ - name : Publish - dry run
39+ run : dart pub publish --dry-run
40+ working-directory : ${{ inputs.working-directory }}
41+ - name : Publish to pub.dev
42+ run : dart pub publish -f
43+ working-directory : ${{ inputs.working-directory }}
You can’t perform that action at this time.
0 commit comments