eslint-config/.drone.yml
EndMove b130a9a96e
All checks were successful
continuous-integration/drone/push Build is passing
Updating .drone.yml
2023-06-28 00:00:51 +02:00

59 lines
1.2 KiB
YAML

---
kind: pipeline
type: docker
name: npm-publish-snapshot
trigger:
event:
- push
branch:
exclude:
- master
steps:
- name: publish-snapshot
image: node:18
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
- export VERSION=$(node -p "require('./package.json').version") || echo "1.0.0"
- SNAPSHOT="$(echo $VERSION)-snapshot.${DRONE_BUILD_NUMBER}"
- echo $VERSION
- echo $SNAPSHOT
- npm ci
- npm version $SNAPSHOT
- npm publish --tag snapshot
# - npm dist-tag add @ioprojects/eslint-config@$SNAPSHOT snapshot
---
kind: pipeline
type: docker
name: npm-publish-release
trigger:
event:
- promote
branch:
- master
environement:
CHANGE: ${CHANGE}
steps:
- name: publish-release
image: node:18
environment:
GITEA_TOKEN:
from_secret: gitea_token
CHANGE: ${CHANGE}
commands:
- git fetch --tags
- OLD_VERSION=$(cat VERSION 2>/dev/null) || echo "1.0.0"
- echo $CHANGE
- npm ci
- npm version $CHANGE
- git push --set-upstream origin `git name-rev --name-only HEAD`
- npm publish
# - npm dist-tag add @ioprojects/eslint-config@$SNAPSHOT snapshot