mirror of
https://github.com/openziti/zrok.git
synced 2025-06-20 09:48:07 +02:00
prepare for 'npm publish' events
This commit is contained in:
parent
fe8cbfe2d7
commit
0b2379d6d1
38
.github/workflows/node-sdk.yml
vendored
38
.github/workflows/node-sdk.yml
vendored
@ -30,20 +30,40 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: Node Version
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node_ver }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
|
||||||
- name: Node Version
|
- name: Bump semver
|
||||||
uses: actions/setup-node@v4
|
if: github.ref == 'refs/heads/main'
|
||||||
|
uses: TriPSs/conventional-changelog-action@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node_ver }}
|
github-token: ${{ secrets.GH_ACTION }}
|
||||||
|
git-message: 'chore(release): {version}'
|
||||||
|
preset: 'angular'
|
||||||
|
tag-prefix: 'v'
|
||||||
|
output-file: 'CHANGELOG.md'
|
||||||
|
skip-on-empty: true # do not alter semver when we push 'chore: ...' commits
|
||||||
|
release-count: 0 # ensure changelog is generated to contain ALL updates
|
||||||
|
|
||||||
- name: Get current date
|
- name: Pull newly bumped semver
|
||||||
id: date
|
if: github.ref == 'refs/heads/main'
|
||||||
run: echo "date=$(date)" >> $GITHUB_OUTPUT
|
run: git pull
|
||||||
|
|
||||||
|
- name: Setup .npmrc
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
# Setup .npmrc file to prepare for possible publish to npm
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
- name: Build NodeJS-SDK
|
- name: Build NodeJS-SDK
|
||||||
run: |
|
run: |
|
||||||
@ -53,6 +73,12 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BUILD_DATE: ${{ steps.date.outputs.date }}
|
BUILD_DATE: ${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Publish production release
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
run: npm publish --access public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: NPM Publish
|
- name: NPM Publish
|
||||||
uses: JS-DevTools/npm-publish@v1
|
uses: JS-DevTools/npm-publish@v1
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user