Archived
0
0
Fork 0
This repository has been archived on 2024-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
library/.drone.yml
2021-08-07 16:52:09 -07:00

72 lines
1.7 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:
NPM_TOKEN:
from_secret: GITEA_TOKEN
when:
branch:
- master
- refactor/rewrite
event:
- push
- 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
event:
- push
- 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}}
when:
status:
- success
- failure