let's see if we get a npm publish

This commit is contained in:
nitowa
2022-10-16 03:00:12 +02:00
parent 42ab3441cd
commit 5ed5e59b22
3 changed files with 85 additions and 1 deletions
+83
View File
@@ -0,0 +1,83 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: restore cache
image: drillster/drone-volume-cache
settings:
restore: true
mount:
- ./node_modules
volumes:
- name: cache
path: /cache
- name: npm install
image: node:12
commands:
- npm install
- name: npm run build
image: node:12
commands:
- npm run build
- name: rebuild cache
image: drillster/drone-volume-cache
settings:
rebuild: true
mount:
- ./node_modules
volumes:
- name: cache
path: /cache
- name: npm run test
image: node:12
commands:
- npm run test
- name: build docs
image: node:12
commands:
- npm run docs
when:
event:
- tag
- name: deliver docs
image: node:12
commands:
- echo ${DRONE_BUILD_CREATED}
- git clone https://gitea.nitowa.xyz/docs/${DRONE_REPO_NAME}.git; cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .; cp ../LICENSE.md .
- sed -i '1,3d; $d' README.md && echo "### Version\n\n${DRONE_TAG}\n" >> ./README.md
- sed -i -e 1,4d ./globals.md && cat ./globals.md >> ./README.md
- git add --all; git -c user.email="${DRONE_COMMIT_AUTHOR_EMAIL}" -c user.name="${DRONE_COMMIT_AUTHOR}" commit --all --allow-empty --message "generated from tag ${DRONE_TAG}"
- (git tag ${DRONE_TAG} && git push --force origin master ${DRONE_TAG}) || true
environment:
GIT_USER:
from_secret: git_user
GIT_PASSWORD:
from_secret: git_password
when:
event:
- tag
- name: npm publish
image: plugins/npm
settings:
username: nitowa
password:
from_secret: npm_password
email: peter.millauer@gmail.com
when:
event:
- tag
volumes:
- name: cache
host:
path: /tmp
+1
View File
@@ -0,0 +1 @@
Hello World
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "depents",
"version": "0.0.1",
"version": "0.0.2",
"description": "depents is a typescript dependency injector",
"main": "./js/Index.js",
"repository": {