File tree Expand file tree Collapse file tree 4 files changed +15
-23
lines changed Expand file tree Collapse file tree 4 files changed +15
-23
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,6 @@ name: Release
33on :
44 schedule :
55 - cron : " 0 17 * * *" # run at 5:00 PM UTC
6- push :
7- branches :
8- - " master"
96
107jobs :
118 release :
Original file line number Diff line number Diff line change @@ -15,16 +15,16 @@ jobs:
1515 uses : actions/setup-node@v1
1616 with :
1717 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({
88 auth : `token ${ githubToken } `
99} ) ;
1010
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 ( ) ;
1512
1613function createGithubRelease ( ) {
1714 octokit . repos
Original file line number Diff line number Diff line change @@ -9,9 +9,7 @@ const todayDate = `${tyear}-${tmonth}-${tdate}`;
99
1010async function isNewChange ( ) {
1111 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 } `
1513 ) ;
1614 commits = await commits . json ( ) ;
1715 return Array . isArray ( commits ) && commits . length > 0 ;
You can’t perform that action at this time.
0 commit comments