-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change github workflow, update dependencies, update pubspec
update dart sdk dependency add auto publish on pub.dev update Readme
- Loading branch information
1 parent
ba8c544
commit 2c57fda
Showing
7 changed files
with
50 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,24 @@ | ||
name: Publish Package | ||
name: Publish to pub.dev | ||
|
||
on: | ||
push: | ||
branches: main | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v' | ||
|
||
# Publish using custom workflow | ||
jobs: | ||
build: | ||
publish: | ||
permissions: | ||
id-token: write # This is required for authentication using OIDC | ||
runs-on: ubuntu-latest | ||
container: | ||
image: google/dart:latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: curl | ||
uses: wei/curl@v1 | ||
- name: Install dependencies | ||
run: pub get | ||
- name: Run tests | ||
run: pub run test | ||
- name: Setup credentials | ||
run: | | ||
mkdir -p ~/.pub-cache | ||
cat <<EOF > ~/.pub-cache/credentials.json | ||
{ | ||
"accessToken":"${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}", | ||
"refreshToken":"${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}", | ||
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token", | ||
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ], | ||
"expiration": ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }} | ||
} | ||
EOF | ||
- name: Publish package | ||
run: pub publish -f | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: dart-lang/setup-dart@v1 | ||
- name: Install dependencies | ||
run: dart pub get | ||
- name: Run tests | ||
run: dart pub run test | ||
# Here you can insert custom steps you need | ||
# - run: dart tool/generate-code.dart | ||
- name: Publish | ||
run: dart pub publish --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters