diff --git a/.woodpecker/.publish-npm-prerelease.yml b/.woodpecker/.publish-npm-prerelease.yml new file mode 100644 index 0000000..3e75911 --- /dev/null +++ b/.woodpecker/.publish-npm-prerelease.yml @@ -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 \ No newline at end of file diff --git a/.woodpecker/.publish-npm.yml b/.woodpecker/.publish-npm.yml index b3802a3..6ab7b77 100644 --- a/.woodpecker/.publish-npm.yml +++ b/.woodpecker/.publish-npm.yml @@ -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 \ No newline at end of file diff --git a/.woodpecker/.test.yml b/.woodpecker/.test.yml index 243b223..9715e1c 100644 --- a/.woodpecker/.test.yml +++ b/.woodpecker/.test.yml @@ -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 \ No newline at end of file + - npm test \ No newline at end of file