Skip to content

Commit ece281c

Browse files
committed
feat: fix pub.dev OAuth credentials path in publishing workflow (#79)
1 parent 561da95 commit ece281c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/dart.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,20 @@ jobs:
6161
- run: npm install -g "@semantic-release/changelog"
6262
- run: npm install -g "@semantic-release/git"
6363
- run: npm install -g "pub-semantic-release"
64+
65+
# Setup pub.dev credentials for automated publishing
66+
# The credentials.json file should be stored as a repository secret
67+
- name: Setup Pub Credentials
68+
run: |
69+
mkdir -p $HOME/.pub-cache
70+
echo '${{ secrets.PUB_CREDENTIALS }}' > $HOME/.pub-cache/credentials.json
6471
6572
- name: Semantic Release
6673
run: |
6774
export NODE_PATH="$(npm root -g)"
6875
npx semantic-release@17
6976
env:
7077
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71-
72-
- name: Setup Pub Credentials
73-
run: |
74-
mkdir -p $HOME/.config/dart
75-
echo '${{ secrets.PUB_CREDENTIALS }}' > $HOME/.config/dart/pub-credentials.json
7678

7779
- name: Publish to pub.dev
7880
run: dart pub publish --force

0 commit comments

Comments
 (0)