File tree 4 files changed +15
-23
lines changed 4 files changed +15
-23
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,6 @@ name: Release
3
3
on :
4
4
schedule :
5
5
- cron : " 0 17 * * *" # run at 5:00 PM UTC
6
- push :
7
- branches :
8
- - " master"
9
6
10
7
jobs :
11
8
release :
Original file line number Diff line number Diff line change @@ -15,16 +15,16 @@ jobs:
15
15
uses : actions/setup-node@v1
16
16
with :
17
17
node_version : 12
18
- # - name: Install
19
- # run: yarn install --frozen-lockfile
20
- # - name: Prepare Npm
21
- # run: sh npm.sh
22
- # env:
23
- # REGISTRY_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
24
- # REGISTRY_URL: registry.npmjs.org
25
- # - name: Test
26
- # run: npm run test
27
- # env:
28
- # REGISTRY_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
29
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Github already has this token by default in repo
30
- # REGISTRY_URL: registry.npmjs.org
18
+ - name : Install
19
+ run : yarn install --frozen-lockfile
20
+ - name : Prepare Npm
21
+ run : sh npm.sh
22
+ env :
23
+ REGISTRY_AUTH_TOKEN : ${{ secrets.REGISTRY_AUTH_TOKEN }}
24
+ REGISTRY_URL : registry.npmjs.org
25
+ - name : Test
26
+ run : npm run test
27
+ env :
28
+ REGISTRY_AUTH_TOKEN : ${{ secrets.REGISTRY_AUTH_TOKEN }}
29
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Github already has this token by default in repo
30
+ REGISTRY_URL : registry.npmjs.org
Original file line number Diff line number Diff line change @@ -8,10 +8,7 @@ const octokit = new Octokit({
8
8
auth : `token ${ githubToken } `
9
9
} ) ;
10
10
11
- // when running the action for first time. give the first argument of this as
12
- // createChangelog('2019-02-14')
13
- // and after that, keep it null i.e `createChange()` only
14
- const { body } = createChangelog ( "2019-02-14" ) ;
11
+ const { body } = createChangelog ( ) ;
15
12
16
13
function createGithubRelease ( ) {
17
14
octokit . repos
Original file line number Diff line number Diff line change @@ -9,9 +9,7 @@ const todayDate = `${tyear}-${tmonth}-${tdate}`;
9
9
10
10
async function isNewChange ( ) {
11
11
let commits = await fetch (
12
- // temporary adding the "'2019-02-14'", replace it with `yesterdayDate`
13
- // "'2019-02-14'" - is the date of the last release
14
- `https://api.github.com/repos/cssnano/cssnano/commits?branch=master&since=${ "2019-02-14" } &until=${ todayDate } `
12
+ `https://api.github.com/repos/cssnano/cssnano/commits?branch=master&since=${ yesterdayDate } &until=${ todayDate } `
15
13
) ;
16
14
commits = await commits . json ( ) ;
17
15
return Array . isArray ( commits ) && commits . length > 0 ;
You can’t perform that action at this time.
0 commit comments