Skip to content

Commit

Permalink
Update pub_workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar authored Aug 2, 2024
1 parent 16440a2 commit fab3429
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions .github/workflows/pub_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
name: Publish to pub.dev

on:
release:
types: [published]
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
build:
runs-on: ubuntu-latest
container:
image: google/dart:latest
steps:
- uses: actions/checkout@v1
- name: Setup credentials
run: |
mkdir -p ~/.config/dart
cat <<EOF > ~/.config/dart/pub-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": 1584628470088
}
EOF
- name: Publish package
run: dart pub publish -f
publish:
permissions:
id-token: write
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
with:
environment: pub.dev

0 comments on commit fab3429

Please sign in to comment.