Skip to content

Commit

Permalink
Update publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xvrh committed Nov 11, 2023
1 parent 49e235d commit 05e0e0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 46 deletions.
31 changes: 7 additions & 24 deletions .github/workflows/publish-on-pub.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
name: Publish package to pub.dev
name: Publish to pub.dev

on:
push:
tags:
- v*
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
build:
runs-on: ubuntu-latest
container:
image: dart:stable
steps:
- uses: actions/checkout@v2
- run: dart pub get
- run: dart tool/check_version.dart ${GITHUB_REF}
- name: Setup 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": 1580681402856
}
EOF
- name: Publish package
run: dart pub publish --force
publish:
permissions:
id-token: write # Required for authentication using OIDC
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
22 changes: 0 additions & 22 deletions tool/check_version.dart

This file was deleted.

0 comments on commit 05e0e0b

Please sign in to comment.