Publishing node lib
This commit is contained in:
parent
7be4efef58
commit
2e42a04c43
@ -6,12 +6,55 @@ on:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
build:
|
||||||
runs-on: internal
|
name: Build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
- run: npm ci
|
- run: |
|
||||||
- run: npm run build
|
npm ci
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
version:
|
||||||
|
name: Version
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.get_version.outputs.version }}
|
||||||
|
commit: ${{ steps.get_commit.outputs.commit }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- id: get_version
|
||||||
|
run: echo version=$(node -p "require('./package.json').version") >> "$GITHUB_OUTPUT"
|
||||||
|
- id: get_commit
|
||||||
|
run: echo "commit=$(echo $DRONE_COMMIT | cut -c1-5)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
# publish_pre:
|
||||||
|
# name: Publish Pre-Release
|
||||||
|
# needs: version
|
||||||
|
# env:
|
||||||
|
# - VERSION: ${{needs.version.outputs.version}}
|
||||||
|
# - COMMIT: ${{needs.version.outputs.commit}}
|
||||||
|
# secrets:
|
||||||
|
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
# steps:
|
||||||
|
# - run: npm version prerelease --preid=$COMMIT --git-tag-version=false --allow-same-version=true
|
||||||
|
# - run: npm config set @watsonb8:registry https://gitea.watsonlabs.net/api/packages/watsonb8/npm/
|
||||||
|
# - run: npm config set -- '//gitea.watsonlabs.net/api/packages/watsonb8/npm/:_authToken' "$NPM_TOKEN"
|
||||||
|
# - run: npm publish
|
||||||
|
|
||||||
|
publish_tagged:
|
||||||
|
name: Publish Latest
|
||||||
|
needs: version
|
||||||
|
secrets:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- run: npm config set @watsonb8:registry https://gitea.watsonlabs.net/api/packages/watsonb8/npm/
|
||||||
|
- run: npm config set -- '//gitea.watsonlabs.net/api/packages/watsonb8/npm/:_authToken' "$NPM_TOKEN"
|
||||||
|
- run: npm publish
|
||||||
|
|
||||||
|
# deploy:
|
||||||
|
# name: Deploy Package
|
||||||
|
Loading…
Reference in New Issue
Block a user