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:
|
when:
|
||||||
branch: main
|
event: release
|
||||||
event: tag
|
evaluate: 'CI_COMMIT_PRERELEASE != "true"'
|
||||||
steps:
|
steps:
|
||||||
prepare:
|
publish:
|
||||||
image: node:20
|
image: node:20
|
||||||
commands:
|
commands:
|
||||||
- npm ci
|
- npm ci
|
||||||
|
- npm config set -- '//registry.npmjs.org/:_authToken' "${npm_token}"
|
||||||
publish-npm:
|
#- npm publish --verbose
|
||||||
when:
|
secrets: [ npm_token ]
|
||||||
branch: main
|
|
||||||
event: tag
|
|
||||||
image: plugins/npm
|
|
||||||
settings:
|
|
||||||
username: yarmo_eu
|
|
||||||
token:
|
|
||||||
from_secret: npm_token
|
|
||||||
email:
|
|
||||||
from_secret: npm_email
|
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- test
|
- test
|
|
@ -2,7 +2,7 @@ when:
|
||||||
event: [push, pull_request, tag, release, manual]
|
event: [push, pull_request, tag, release, manual]
|
||||||
steps:
|
steps:
|
||||||
test:
|
test:
|
||||||
image: node
|
image: node:20
|
||||||
commands:
|
commands:
|
||||||
- npm ci
|
- npm ci
|
||||||
- npm run test
|
- npm test
|
Loading…
Reference in a new issue