File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Publish new plugin version
1+ name : Publish to pub.dev
2+
23on :
3- workflow_dispatch :
44 push :
5- branches :
6- - release
5+ tags :
6+ - ' v[0-9]+.[0-9]+.[0-9]+* '
77
88jobs :
99 publish :
10- runs-on : ubuntu-latest
11-
12- steps :
13- - uses : actions/checkout@v2
14- - uses : subosito/flutter-action@v2
15- with :
16- flutter-version : " 3.7.7"
17- channel : " stable"
18- - run : |
19- flutter --version
20- flutter pub get
21- flutter analyze --fatal-infos
22-
23- - name : Create credentials file
24- run : echo $PUB_CREDENTIALS > ~/pub-credentials.json
25- env :
26- PUB_CREDENTIALS : ${{ secrets.PUB_CREDENTIALS }}
27-
28- - name : Add credentials to Dart folder
29- run : |
30- mkdir -p ${XDG_CONFIG_HOME:-${HOME:-default}}/dart
31- touch ${XDG_CONFIG_HOME:-${HOME:-default}}/dart/pub-credentials.json
32- cp ~/pub-credentials.json ${XDG_CONFIG_HOME:-${HOME:-default}}/dart/pub-credentials.json
33- env :
34- PUB_CREDENTIALS : ${{ secrets.PUB_CREDENTIALS }}
35-
36- - name : Publish
37- run : dart pub publish --force
10+ permissions :
11+ id-token : write # Required for authentication using OIDC
12+ uses : dart-lang/setup-dart/.github/workflows/publish.yml@v1
13+ # with:
14+ # working-directory: path/to/package/within/repository
You can’t perform that action at this time.
0 commit comments