Skip to content

Commit 1362d66

Browse files
Merge 53b9088 into master
2 parents 33a8380 + 53b9088 commit 1362d66

File tree

6 files changed

+101
-7
lines changed

6 files changed

+101
-7
lines changed

.github/publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
tags: rc*
6+
branches: staging
7+
8+
9+
10+
jobs:
11+
pub:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: echo
15+
run: env

.github/workflows/ci.yml

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Publish (dry run)
4848
run: dart pub publish --dry-run
4949

50-
merge-to-staging:
50+
to-staging:
5151
needs: [test, analyze]
5252
runs-on: ubuntu-latest
5353
steps:
@@ -57,4 +57,64 @@ jobs:
5757
with:
5858
type: now
5959
target_branch: staging
60-
github_token: ${{ github.token }}
60+
github_token: ${{ github.token }}
61+
62+
to-pubdev:
63+
needs: [test, analyze]
64+
runs-on: ubuntu-latest
65+
if: github.event.head_commit.message=='publish'
66+
container:
67+
image: google/dart:latest
68+
steps:
69+
- uses: actions/checkout@v1
70+
- name: Setup credentials
71+
# data from cat ~/.pub-cache/credentials.json
72+
run: |
73+
mkdir -p ~/.pub-cache
74+
cat <<EOF > ~/.pub-cache/credentials.json
75+
{
76+
"accessToken":"${{ secrets.PUBDEV_ACCESS_TOKEN }}",
77+
"refreshToken":"${{ secrets.PUBDEV_REFRESH_TOKEN }}",
78+
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token",
79+
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
80+
"expiration": 1570721159347
81+
}
82+
EOF
83+
- name: Publish package
84+
run: pub publish -f
85+
#run: pub publish -dry-run
86+
87+
to-master:
88+
needs: to-pubdev
89+
runs-on: ubuntu-latest
90+
steps:
91+
- uses: actions/checkout@master
92+
- name: Merge current -> master
93+
uses: devmasx/merge-branch@v1.3.1
94+
with:
95+
type: now
96+
target_branch: master
97+
github_token: ${{ github.token }}
98+
99+
100+
101+
102+
# pub:
103+
# if: startsWith(github.event.ref, 'refs/tags/rc')
104+
# runs-on: ubuntu-latest
105+
# steps:
106+
# - name: echo
107+
# run: echo "Yes"
108+
#
109+
# merge-to-master:
110+
# needs: [test, analyze]
111+
# if: startsWith(github.event.ref, 'refs/tags/rc')
112+
# runs-on: ubuntu-latest
113+
# steps:
114+
# - uses: actions/checkout@v2
115+
# - name: Merge current -> master
116+
# uses: devmasx/merge-branch@v1.3.1
117+
# with:
118+
# type: now
119+
# target_branch: master
120+
# github_token: ${{ github.token }}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 0.2.0+0-alpha
1+
# 0.2.0+1-alpha
22

33
- Added TimeScheduler
44

Pipfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
8+
[dev-packages]
9+
10+
[requires]
11+
python_version = "3.9"

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
2-
# schedulers
3-
41
Dart library for running asynchronous functions on time. Useful for
52
load balancing, rate limiting, lazy execution.
63

74
*In the examples below, all the `run(callback)` calls are performed right
85
after object creation. But it fact all the schedulers are ready to handle
96
`run` calls at random moments.*
107

8+
# TimeScheduler
9+
10+
Runs tasks asynchronously at the specified time.
11+
12+
``` dart
13+
final scheduler = TimeScheduler();
14+
15+
scheduler.run(() { ... callback ... }, DateTime(2020, 02, 20, 20, 02, 20));
16+
```
17+
1118
# IntervalScheduler
1219

1320
Runs tasks asynchronously, maintaining a fixed time interval between starts.

pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: schedulers
22
description: Dart library for running asynchronous functions on time. Useful for load balancing, rate limiting, lazy execution.
33
repository: https://github.com/rtmigo/schedulers
44

5-
version: 0.2.0+0-alpha
5+
version: 0.2.0+1-alpha
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"
@@ -12,5 +12,6 @@ dependencies:
1212
meta: ^1.3.0
1313
collection: ^1.15.0
1414

15+
1516
dev_dependencies:
1617
test: ^1.5.1

0 commit comments

Comments
 (0)