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

73 lines
1.7 KiB
YAML
Raw Normal View History

2021-08-07 23:09:05 +00:00
kind: pipeline
type: docker
name: default
steps:
2021-08-07 23:27:41 +00:00
- name: install
2021-08-07 23:09:05 +00:00
image: node:14
commands:
2021-08-07 23:27:41 +00:00
- echo ===== INSTALLING DEPENDENCIES =====
- yarn install
- name: build
image: node:14
commands:
- echo ===== BUILDING APPLICATION =====
- yarn build
2021-08-07 23:33:26 +00:00
- name: publish-dev
2021-08-07 23:27:41 +00:00
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
2021-08-07 23:27:41 +00:00
2021-08-07 23:33:26 +00:00
- name: publish-stable
2021-08-07 23:27:41 +00:00
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
2021-08-07 23:42:56 +00:00
- 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}}
2021-08-07 23:52:09 +00:00
when:
status:
- success
- failure