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 13:26:08 +02:00
|
|
|
- export VERSION=$(node -p "require('./package.json').version") || echo "1.0.0"
|
|
|
|
- SNAPSHOT="$(echo $VERSION)-snapshot.${DRONE_BUILD_NUMBER}"
|
|
|
|
- echo $VERSION
|
|
|
|
- echo $SNAPSHOT
|
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:
|
2023-06-28 15:53:46 +02:00
|
|
|
VERSION: ${VERSION}
|
2023-06-28 13:26:08 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: publish-release
|
|
|
|
image: node:18
|
|
|
|
environment:
|
|
|
|
GITEA_TOKEN:
|
|
|
|
from_secret: gitea_token
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
|
|
|
- npm ci
|
2023-06-28 15:53:46 +02:00
|
|
|
- echo $(node -p "require('./package.json').version")
|
2023-06-28 13:26:08 +02:00
|
|
|
- echo $VERSION
|
2023-06-28 15:53:46 +02:00
|
|
|
- npm version $VERSION
|
2023-06-28 16:06:53 +02:00
|
|
|
- git push --set-upstream origin master
|
2023-06-28 16:06:53 +02:00
|
|
|
- git tag -l
|
|
|
|
- git push --set-upstream origin $(node -p "require('./package.json').version")
|
2023-04-12 20:42:47 +02:00
|
|
|
- npm publish
|