File tree 2 files changed +10
-10
lines changed
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 88
88
89
89
- run : pnpm install
90
90
91
- - run : pnpm release --vapor --skip-tests
91
+ - run : pnpm release --vapor --skip-tests --tag ${{ github.ref == 'refs/heads/main' && 'latest' || 'branch' }}
92
92
env :
93
93
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
94
94
NPM_CONFIG_PROVENANCE : ' true'
Original file line number Diff line number Diff line change @@ -140,21 +140,21 @@ async function main() {
140
140
const major = semver . major ( currentVersion )
141
141
let newVersion
142
142
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
+
143
151
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 } `
152
152
newVersion = `${ major } .${ datestamp } .0`
153
153
if ( args . tag && args . tag !== 'latest' ) {
154
154
newVersion = `${ major } .${ datestamp } .0-${ args . tag } .0`
155
155
}
156
156
} else {
157
- newVersion = `${ major } .2024 .0-${ await getSha ( true ) } `
157
+ newVersion = `${ major } .${ datestamp } .0-${ await getSha ( true ) } `
158
158
}
159
159
160
160
// check the registry to avoid version collision
You can’t perform that action at this time.
0 commit comments