File tree Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 44 test :
55 required : false
66 type : boolean
7- secrets : inherit
87jobs :
98 images :
109 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 55 bump :
66 type : choice
77 required : true
8- description : Bump version number
8+ description : Bump version number
99 options : [major, minor, patch]
1010 default : patch
1111 pull_request :
@@ -21,14 +21,17 @@ jobs:
2121 git config --global user.email [email protected] 2222 git checkout -b bump/$(npm version ${{ github.event.inputs.bump }})
2323 git push --set-upstream origin --follow-tags HEAD
24- gh pr create --title "Bump version to $(git describe --tags)" --fill
24+ gh pr create --title "Bump version to $(git describe --tags)" --body "Approve me 🤖"
25+ gh pr merge --squash --auto
2526 env:
26- GITHUB_TOKEN: ${{ github.token }}
27+ GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
2728 release :
2829 if : github.event.pull_request.merged && startsWith(github.head_ref, 'bump/')
2930 runs-on : ubuntu-latest
3031 steps :
3132 - uses : actions/checkout@v2
32- - run : gh release create --generate-notes --draft {--target=,--title=CML\ ,}$(basename ${{ github.head_ref }})
33+ - run :
34+ gh release create --generate-notes {--title=CML\ ,}$(basename ${{
35+ github.head_ref }})
3336 env :
34- GITHUB_TOKEN : ${{ github.token }}
37+ GITHUB_TOKEN : ${{ secrets.ADMIN_GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ name: Test & Deploy
22on :
33 schedule :
44 - cron : ' 0 8 * * 1' # M H d m w (Mondays at 8:00)
5- push :
6- tags : ['v*' ]
5+ release :
6+ types : [created ]
77 pull_request_target :
88 workflow_dispatch :
99jobs :
4848 - run : |
4949 pip install tensorboard
5050 pip install -I protobuf==3.20.1
51- - run : npm ci
51+ - run : npm ci && npm install --global
5252 - run : npm run test
5353 env :
5454 GITHUB_TOKEN : ${{ github.token }}
9999 registry-url : https://registry.npmjs.org
100100 - run : npm install
101101 - run :
102- npm ${{ github.event_name == 'push ' && 'publish' || 'publish
102+ npm ${{ github.event_name == 'release ' && 'publish' || 'publish
103103 --dry-run' }}
104104 env :
105105 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
@@ -121,11 +121,8 @@ jobs:
121121 cp build/cml-linux{-x64,}
122122 cp build/cml-macos{-x64,}
123123 - uses : softprops/action-gh-release@v1
124- if : github.event_name == 'push '
124+ if : github.event_name == 'release '
125125 with :
126- name : CML ${{ steps.build.outputs.tag }}
127- draft : true
128- generate_release_notes : true
129126 files : |
130127 build/cml-alpine-arm64
131128 build/cml-alpine-x64
@@ -143,4 +140,5 @@ jobs:
143140 GITHUB_TOKEN : ${{ secrets.TEST_GITHUB_TOKEN }}
144141 images :
145142 needs : packages
146- uses : .github/workflows/images.yml
143+ secrets : inherit
144+ uses : ./.github/workflows/images.yml
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ const commands = Object.keys(bin)
88describe ( 'command-line interface tests' , ( ) => {
99 for ( const command of commands )
1010 test ( `legacy cml-${ command } behaves as the new cml ${ command } ` , async ( ) => {
11- const legacyOutput = await exec ( `npx --package=. cml-${ command } --help` ) ;
12- const newOutput = await exec ( `npx --package=. cml ${ command } --help` ) ;
11+ const legacyOutput = await exec ( `cml-${ command } --help` ) ;
12+ const newOutput = await exec ( `cml ${ command } --help` ) ;
1313 expect ( legacyOutput ) . toBe ( newOutput ) ;
1414 } ) ;
1515} ) ;
You can’t perform that action at this time.
0 commit comments