Skip to content

Commit

Permalink
Use setup-pubdev-credentials 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
crow committed Aug 18, 2024
1 parent f4229fe commit 0467c99
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,11 @@ jobs:
- run: flutter pub get

- name: Setup pub credentials
run: |
mkdir -p ~/.pub-cache
cat <<EOF > ~/.pub-cache/credentials.json
{
"accessToken":"${{ secrets.OAUTH_ACCESS_TOKEN }}",
"refreshToken":"${{ secrets.OAUTH_REFRESH_TOKEN }}",
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token",
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
"expiration": ${{secrets.OAUTH_EXPIRATION }}
}
EOF
mkdir -p ~/Library/Application\ Support/dart/
cp ~/.pub-cache/credentials.json ~/Library/Application\ Support/dart/pub-credentials.json
cp ~/.pub-cache/credentials.json $PUB_CACHE/credentials.json || true
uses: [email protected]
with:
oauth_access_token: ${{ secrets.OAUTH_ACCESS_TOKEN }}
oauth_refresh_token: ${{ secrets.OAUTH_REFRESH_TOKEN }}
oauth_expiration: ${{ secrets.OAUTH_EXPIRATION }}

- name: Publish Dart/Flutter package
run: flutter pub publish -f
Expand Down

0 comments on commit 0467c99

Please sign in to comment.