Archived
0
0
Fork 0

ci: migrate jenkins to drone

This commit is contained in:
Daryl Ronningen 2021-08-07 16:27:41 -07:00
parent ebb2d10fc2
commit 223fbb6da6
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B

View file

@ -3,8 +3,55 @@ type: docker
name: default name: default
steps: steps:
- name: greeting - name: install
image: node:14 image: node:14
commands: commands:
- echo hello - echo ===== INSTALLING DEPENDENCIES =====
- echo world - yarn install
- name: build
image: node:14
commands:
- echo ===== BUILDING APPLICATION =====
- yarn build
- name: publish
image: node:14
commands:
- echo ===== PUBLISHING APPLICATION =====
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" > ~/.npmrc
- yarn version $${(node -pe \'require("./package.json").version\')}-$${(git rev-parse HEAD)}.$${(date +%s)}
- npm publish --tag dev --access public
environment:
GITEA_URL: "https://code.relms.dev/NeonJS/library"
GITEA_TOKEN:
from_secret: GITEA_TOKEN
NPM_TOKEN:
from_secret: GITEA_TOKEN
GIT_AUTHOR_NAME: "DroneCI"
GIT_AUTHOR_EMAIL: "drone@relms.dev"
GIT_COMMITTER_NAME: "DroneCI"
GIT_COMMITTER_EMAIL: "drone@relms.dev"
when:
branch:
- master
- refactor/rewrite
- name: publish
image: node:14
commands:
- echo ===== PUBLISHING APPLICATION =====
- yarn semantic-release
environment:
GITEA_URL: "https://code.relms.dev/NeonJS/library"
GITEA_TOKEN:
from_secret: GITEA_TOKEN
NPM_TOKEN:
from_secret: GITEA_TOKEN
GIT_AUTHOR_NAME: "DroneCI"
GIT_AUTHOR_EMAIL: "drone@relms.dev"
GIT_COMMITTER_NAME: "DroneCI"
GIT_COMMITTER_EMAIL: "drone@relms.dev"
when:
branch:
- stable