mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 14:39:28 -07:00
feat: improve CI releases, support prereleases
This commit is contained in:
parent
f3521e21be
commit
2a36699ffa
3 changed files with 22 additions and 17 deletions
14
.woodpecker/.publish-npm-prerelease.yml
Normal file
14
.woodpecker/.publish-npm-prerelease.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
when:
|
||||
event: release
|
||||
evaluate: 'CI_COMMIT_PRERELEASE == "true"'
|
||||
steps:
|
||||
publish-prerelease:
|
||||
image: node:20
|
||||
commands:
|
||||
- npm ci
|
||||
- npm config set -- '//registry.npmjs.org/:_authToken' "${npm_token}"
|
||||
- npm publish --verbose --tag next
|
||||
secrets: [ npm_token ]
|
||||
|
||||
depends_on:
|
||||
- test
|
|
@ -1,23 +1,14 @@
|
|||
when:
|
||||
branch: main
|
||||
event: tag
|
||||
event: release
|
||||
evaluate: 'CI_COMMIT_PRERELEASE != "true"'
|
||||
steps:
|
||||
prepare:
|
||||
publish:
|
||||
image: node:20
|
||||
commands:
|
||||
- npm ci
|
||||
|
||||
publish-npm:
|
||||
when:
|
||||
branch: main
|
||||
event: tag
|
||||
image: plugins/npm
|
||||
settings:
|
||||
username: yarmo_eu
|
||||
token:
|
||||
from_secret: npm_token
|
||||
email:
|
||||
from_secret: npm_email
|
||||
- npm config set -- '//registry.npmjs.org/:_authToken' "${npm_token}"
|
||||
#- npm publish --verbose
|
||||
secrets: [ npm_token ]
|
||||
|
||||
depends_on:
|
||||
- test
|
|
@ -2,7 +2,7 @@ when:
|
|||
event: [push, pull_request, tag, release, manual]
|
||||
steps:
|
||||
test:
|
||||
image: node
|
||||
image: node:20
|
||||
commands:
|
||||
- npm ci
|
||||
- npm run test
|
||||
- npm test
|
Loading…
Reference in a new issue