ci: migrate jenkins to drone
This commit is contained in:
parent
ebb2d10fc2
commit
223fbb6da6
1 changed files with 50 additions and 3 deletions
53
.drone.yml
53
.drone.yml
|
@ -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
|
||||||
|
|
Reference in a new issue