From 5ed5e59b229e6224ec8490ec8c469daeabc9893a Mon Sep 17 00:00:00 2001 From: nitowa Date: Sun, 16 Oct 2022 03:00:12 +0200 Subject: [PATCH] let's see if we get a npm publish --- .drone.yml | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 1 + package.json | 2 +- 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 .drone.yml create mode 100644 README.md diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..61a04c1 --- /dev/null +++ b/.drone.yml @@ -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 \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..5e1c309 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Hello World \ No newline at end of file diff --git a/package.json b/package.json index af69e02..aad745e 100644 --- a/package.json +++ b/package.json @@ -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": {