This repository was archived by the owner on Jul 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 8888
8989 - run : pnpm install
9090
91- - run : pnpm release --vapor --skip-tests
91+ - run : pnpm release --vapor --skip-tests --tag ${{ github.ref == 'refs/heads/main' && 'latest' || 'branch' }}
9292 env :
9393 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
9494 NPM_CONFIG_PROVENANCE : ' true'
Original file line number Diff line number Diff line change @@ -140,21 +140,21 @@ async function main() {
140140 const major = semver . major ( currentVersion )
141141 let newVersion
142142
143+ // The canary version string format is `3.yyyyMMdd.0` (or `3.yyyyMMdd.0-minor.0` for minor)
144+ // Use UTC date so that it's consistent across CI and maintainers' machines
145+ const date = new Date ( )
146+ const yyyy = date . getUTCFullYear ( )
147+ const MM = ( date . getUTCMonth ( ) + 1 ) . toString ( ) . padStart ( 2 , '0' )
148+ const dd = date . getUTCDate ( ) . toString ( ) . padStart ( 2 , '0' )
149+ const datestamp = `${ yyyy } ${ MM } ${ dd } `
150+
143151 if ( isCanary ) {
144- // The canary version string format is `3.yyyyMMdd.0` (or `3.yyyyMMdd.0-minor.0` for minor)
145- // Use UTC date so that it's consistent across CI and maintainers' machines
146- const date = new Date ( )
147- const yyyy = date . getUTCFullYear ( )
148- const MM = ( date . getUTCMonth ( ) + 1 ) . toString ( ) . padStart ( 2 , '0' )
149- const dd = date . getUTCDate ( ) . toString ( ) . padStart ( 2 , '0' )
150-
151- const datestamp = `${ yyyy } ${ MM } ${ dd } `
152152 newVersion = `${ major } .${ datestamp } .0`
153153 if ( args . tag && args . tag !== 'latest' ) {
154154 newVersion = `${ major } .${ datestamp } .0-${ args . tag } .0`
155155 }
156156 } else {
157- newVersion = `${ major } .2024 .0-${ await getSha ( true ) } `
157+ newVersion = `${ major } .${ datestamp } .0-${ await getSha ( true ) } `
158158 }
159159
160160 // check the registry to avoid version collision
You can’t perform that action at this time.
0 commit comments