57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: install
|
|
image: node:14
|
|
commands:
|
|
- echo ===== INSTALLING DEPENDENCIES =====
|
|
- yarn install
|
|
|
|
- name: build
|
|
image: node:14
|
|
commands:
|
|
- echo ===== BUILDING APPLICATION =====
|
|
- yarn build
|
|
|
|
- name: publish-dev
|
|
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-stable
|
|
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
|