2023-04-12 20:42:47 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2023-06-28 13:26:08 +02:00
|
|
|
name: snapshot
|
2023-04-12 20:42:47 +02:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
2023-06-28 13:26:08 +02:00
|
|
|
branch:
|
|
|
|
exclude:
|
|
|
|
- master
|
2023-04-12 20:42:47 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: publish-snapshot
|
|
|
|
image: node:18
|
|
|
|
environment:
|
|
|
|
GITEA_TOKEN:
|
|
|
|
from_secret: gitea_token
|
|
|
|
commands:
|
2023-06-28 14:53:19 +02:00
|
|
|
- SNAPSHOT="snapshot-build.${DRONE_BUILD_NUMBER}"
|
2023-06-28 13:26:08 +02:00
|
|
|
- echo $VERSION
|
2023-06-28 14:53:19 +02:00
|
|
|
- echo $(node -p "require('./package.json').version")
|
2023-04-12 20:42:47 +02:00
|
|
|
- npm ci
|
2023-06-28 13:26:08 +02:00
|
|
|
- npm version $SNAPSHOT
|
|
|
|
- npm publish --tag snapshot
|
|
|
|
# - npm dist-tag add @ioprojects/eslint-config@$SNAPSHOT snapshot
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2023-06-28 13:26:08 +02:00
|
|
|
name: checkup
|
2023-06-28 13:26:08 +02:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
2023-06-28 13:26:08 +02:00
|
|
|
- push
|
2023-06-28 13:26:08 +02:00
|
|
|
- promote
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
|
2023-06-28 13:26:08 +02:00
|
|
|
steps:
|
|
|
|
- name: package-checkup
|
|
|
|
image: node:18
|
|
|
|
commands:
|
|
|
|
- export DATA=$(node -p "require('./package.json')") || echo "No Data Found"
|
|
|
|
- echo "Package Data :"
|
|
|
|
- echo $DATA
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: release
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- checkup
|
|
|
|
|
|
|
|
environment:
|
|
|
|
CHANGE: ${CHANGE}
|
2023-06-28 13:26:08 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: publish-release
|
|
|
|
image: node:18
|
|
|
|
environment:
|
|
|
|
GITEA_TOKEN:
|
|
|
|
from_secret: gitea_token
|
|
|
|
CHANGE: ${CHANGE}
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
|
|
|
- npm ci
|
|
|
|
- echo $CHANGE
|
|
|
|
- npm version $CHANGE
|
|
|
|
- git push --set-upstream origin `git name-rev --name-only HEAD`
|
|
|
|
- export VERSION=$(node -p "require('./package.json').version") || echo "1.0.0"
|
|
|
|
- echo $VERSION
|
2023-04-12 20:42:47 +02:00
|
|
|
- npm publish
|