Compare commits

...

1 Commits

Author SHA1 Message Date
a6152cc14e ... 2021-01-23 11:23:33 +01:00

View File

@ -1,8 +1,8 @@
name: Publish package to pub.dev name: Publish package to pub.dev
on: on:
push: push:
tags: # tags:
- v* # - v*
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -14,19 +14,19 @@ jobs:
- run: flutter pub get - run: flutter pub get
- run: flutter pub run tool/publish/comment_dependency_overrides.dart - run: flutter pub run tool/publish/comment_dependency_overrides.dart
- run: flutter pub get - run: flutter pub get
- run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF} - run: echo ${GITHUB_REF}
- run: flutter pub run tool/publish/check_version.dart ${{ env.RELEASE_VERSION }} - run: flutter pub run tool/publish/check_version.dart ${GITHUB_REF}
- name: Setup credentials # - name: Setup credentials
run: | # run: |
mkdir -p $FLUTTER_HOME/.pub-cache # mkdir -p $FLUTTER_HOME/.pub-cache
cat <<EOF > $FLUTTER_HOME/.pub-cache/credentials.json # cat <<EOF > $FLUTTER_HOME/.pub-cache/credentials.json
{ # {
"accessToken":"${{ secrets.OAUTH_ACCESS_TOKEN }}", # "accessToken":"${{ secrets.OAUTH_ACCESS_TOKEN }}",
"refreshToken":"${{ secrets.OAUTH_REFRESH_TOKEN }}", # "refreshToken":"${{ secrets.OAUTH_REFRESH_TOKEN }}",
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token", # "tokenEndpoint":"https://accounts.google.com/o/oauth2/token",
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ], # "scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
"expiration": 1580681402856 # "expiration": 1580681402856
} # }
EOF # EOF
- name: Publish package # - name: Publish package
run: flutter pub publish --force # run: flutter pub publish --force