Skip to content

Commit

Permalink
Merge 29e783e into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Apr 20, 2021
2 parents 4a91936 + 29e783e commit 802ca76
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 34 deletions.
74 changes: 43 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,22 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest] # , macos-latest
platform: [vm, chrome] # , macos-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Run tests VM
run: dart test
- name: Run tests Web
run: dart test --platform chrome
- name: Run tests
run: dart test --platform ${{ matrix.platform }}

analyze:
runs-on: ubuntu-latest
container:
image: google/dart:latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
#- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Analyze
Expand All @@ -58,32 +59,9 @@ jobs:
target_branch: staging
github_token: ${{ github.token }}

to-pubdev:
needs: [test, analyze]
runs-on: ubuntu-latest
to-master:
if: github.event.head_commit.message=='publish'
container:
image: google/dart:latest
steps:
- uses: actions/checkout@v1
- name: Setup credentials
# data from cat ~/.pub-cache/credentials.json
run: |
mkdir -p ~/.pub-cache
cat <<EOF > ~/.pub-cache/credentials.json
{
"accessToken":"${{ secrets.PUBDEV_ACCESS_TOKEN }}",
"refreshToken":"${{ secrets.PUBDEV_REFRESH_TOKEN }}",
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token",
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
"expiration": 1570721159347
}
EOF
- name: Publish package
run: pub publish -f

release:
needs: to-pubdev
needs: [test, analyze]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -106,4 +84,38 @@ jobs:
with:
tag_name: ${{ env.PKGVER }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

to-pubdev:
needs: to-master
runs-on: ubuntu-latest
container:
image: google/dart:latest
steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: dart pub get
- name: Format
run: dart format .
- name: Test formatted
run: dart test
- name: Analyze formatted
run: dart analyze --fatal-infos

- name: Setup credentials
# data from cat ~/.pub-cache/credentials.json
run: |
mkdir -p ~/.pub-cache
cat <<EOF > ~/.pub-cache/credentials.json
{
"accessToken":"${{ secrets.PUBDEV_ACCESS_TOKEN }}",
"refreshToken":"${{ secrets.PUBDEV_REFRESH_TOKEN }}",
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token",
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
"expiration": 1570721159347
}
EOF
- name: Publish package
run: pub publish -f

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.2.1-alpha
# 0.2.3-alpha

- Added TimeScheduler

Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: schedulers
description: Dart library for running asynchronous functions on time. Useful for load balancing, rate limiting, lazy execution.
repository: https://github.com/rtmigo/schedulers

version: 0.2.1-alpha
version: 0.2.3-alpha

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -12,6 +12,5 @@ dependencies:
meta: ^1.3.0
collection: ^1.15.0


dev_dependencies:
test: ^1.5.1

0 comments on commit 802ca76

Please sign in to comment.