kind: pipeline
type: docker
name: default
steps:
- name: install
image: node:14
commands:
- echo ===== INSTALLING DEPENDENCIES =====
- yarn install
- name: build
- echo ===== BUILDING APPLICATION =====
- yarn build
- name: publish-dev
- 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:
NPM_TOKEN:
from_secret: GITEA_TOKEN
when:
branch:
- master
- refactor/rewrite
event:
- push
- name: publish-stable
- yarn semantic-release
GITEA_URL: "https://code.relms.dev/NeonJS/library"
GITEA_TOKEN:
GIT_AUTHOR_NAME: "DroneCI"
GIT_AUTHOR_EMAIL: "drone@relms.dev"
GIT_COMMITTER_NAME: "DroneCI"
GIT_COMMITTER_EMAIL: "drone@relms.dev"
- stable
- name: discord-notification
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: DISCORD_WEBHOOK_ID
webhook_token:
from_secret: DISCORD_WEBHOOK_TOKEN
message: >
{{#success build.status}}
Build {{build.number}} succeeded.
{{else}}
Build {{build.number}} failed.
{{/success}}
status:
- success
- failure