eslint-config/.drone.yml

59 lines
1.2 KiB
YAML
Raw Normal View History

---
kind: pipeline
type: docker
name: npm-publish-snapshot
trigger:
event:
- push
2023-06-03 13:13:29 +02:00
branch:
exclude:
- master
steps:
- name: publish-snapshot
image: node:18
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
2023-06-28 00:00:51 +02:00
- export VERSION=$(node -p "require('./package.json').version") || echo "1.0.0"
2023-04-13 19:00:29 +02:00
- SNAPSHOT="$(echo $VERSION)-snapshot.${DRONE_BUILD_NUMBER}"
2023-04-12 21:09:36 +02:00
- echo $VERSION
- echo $SNAPSHOT
- npm ci
2023-04-13 19:00:29 +02:00
- npm version $SNAPSHOT
2023-04-14 17:33:39 +02:00
- npm publish --tag snapshot
2023-06-27 18:44:40 +02:00
# - npm dist-tag add @ioprojects/eslint-config@$SNAPSHOT snapshot
2023-06-03 13:13:29 +02:00
---
kind: pipeline
type: docker
name: npm-publish-release
trigger:
event:
2023-06-28 00:00:51 +02:00
- promote
2023-06-03 13:13:29 +02:00
branch:
- master
2023-06-28 00:00:51 +02:00
environement:
CHANGE: ${CHANGE}
2023-06-03 13:13:29 +02:00
steps:
- name: publish-release
image: node:18
environment:
GITEA_TOKEN:
from_secret: gitea_token
2023-06-28 00:00:51 +02:00
CHANGE: ${CHANGE}
2023-06-03 13:13:29 +02:00
commands:
- git fetch --tags
- OLD_VERSION=$(cat VERSION 2>/dev/null) || echo "1.0.0"
2023-06-28 00:00:51 +02:00
- echo $CHANGE
2023-06-03 13:13:29 +02:00
- npm ci
2023-06-28 00:00:51 +02:00
- npm version $CHANGE
- git push --set-upstream origin `git name-rev --name-only HEAD`
2023-06-03 13:13:29 +02:00
- npm publish
2023-06-27 18:44:40 +02:00
# - npm dist-tag add @ioprojects/eslint-config@$SNAPSHOT snapshot