Skip to content

Commit 95a5d0c

Browse files
author
lask
authored
1 parent b0d26aa commit 95a5d0c

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Publish new plugin version
2-
on:
2+
on:
33
push:
44
branches:
55
- release
@@ -12,10 +12,19 @@ jobs:
1212
- uses: actions/checkout@v2
1313
- uses: dart-lang/setup-dart@v1
1414

15+
- name: Create credentials file
16+
run: echo $PUB_CREDENTIALS > ~/pub-credentials.json
17+
env:
18+
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }}
19+
20+
- name: Add credentials to Dart folder
21+
run: |
22+
mkdir -p ${XDG_CONFIG_HOME:-${HOME:-default}}/dart
23+
touch ${XDG_CONFIG_HOME:-${HOME:-default}}/dart/pub-credentials.json
24+
cp ~/pub-credentials.json ${XDG_CONFIG_HOME:-${HOME:-default}}/dart/pub-credentials.json
25+
env:
26+
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }}
27+
1528
- 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
29+
run: dart pub publish --force
30+

0 commit comments

Comments
 (0)