File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Publish new plugin version
22on :
3+ workflow_dispatch :
34 push :
45 branches :
56 - release
@@ -12,10 +13,24 @@ jobs:
1213 - uses : actions/checkout@v2
1314 - uses : dart-lang/setup-dart@v1
1415
16+ - name : Checkout to release branch
17+ run : |
18+ git fetch
19+ git checkout ${{ github.ref_name }}
20+
21+ - name : Create credentials file
22+ run : echo $PUB_CREDENTIALS > ~/pub-credentials.json
23+ env :
24+ PUB_CREDENTIALS : ${{ secrets.PUB_CREDENTIALS }}
25+
26+ - name : Add credentials to Dart folder
27+ run : |
28+ mkdir -p ${XDG_CONFIG_HOME:-${HOME:-default}}/dart
29+ touch ${XDG_CONFIG_HOME:-${HOME:-default}}/dart/pub-credentials.json
30+ cp ~/pub-credentials.json ${XDG_CONFIG_HOME:-${HOME:-default}}/dart/pub-credentials.json
31+ env :
32+ PUB_CREDENTIALS : ${{ secrets.PUB_CREDENTIALS }}
33+
1534 - name : Publish
16- uses : sakebook/actions-flutter-pub-publisher@v1.3.1
17- with :
18- credential : ${{ secrets.PUB_CREDENTIALS }}
19- flutter_package : true
20- skip_test : true
21- dry_run : true
35+ run : dart pub publish --force
36+
You can’t perform that action at this time.
0 commit comments