Skip to content

Commit

Permalink
ci: use service account for publishing to pubDev (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: Nando Schär <[email protected]>
  • Loading branch information
nschaer92 and Nando Schär authored Feb 10, 2025
1 parent 821f672 commit 7a76173
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ jobs:
- uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_DEPLOYMENT_TOKEN }}
- uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: gcloud auth print-identity-token --audiences=https://pub.dev | dart pub token add https://pub.dev
- name: release
uses: cycjimmy/semantic-release-action@v4
with:
Expand All @@ -26,4 +30,3 @@ jobs:
@semantic-release/changelog
env:
GITHUB_TOKEN: ${{ secrets.REPO_DEPLOYMENT_TOKEN }}
CREDENTIALS: ${{ secrets.PUB_DEV_DEPLOYMENT_CREDENTIALS }}
1 change: 0 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
[
"@semantic-release/exec",
{
"verifyConditionsCmd": "if [ -z \"$CREDENTIALS\" ]; then exit 1; fi && mkdir -p ~/.config/dart && echo \"$CREDENTIALS\" > ~/.config/dart/pub-credentials.json",
"prepareCmd": "sed -i 's/^version: .*$/version: ${nextRelease.version}/' pubspec.yaml",
"publishCmd": "flutter pub publish -f"
}
Expand Down

0 comments on commit 7a76173

Please sign in to comment.