CI for the zrok NodeJS SDK

This commit is contained in:
Curt Tudor 2024-05-01 06:16:18 -06:00
parent 5ee69d96b6
commit 8e0d333460
No known key found for this signature in database
GPG Key ID: B3CD225AF4EC8E96

View File

@ -46,6 +46,7 @@ jobs:
run: echo ::set-output name=TAG::$(git describe --tags --abbrev=0)
- name: Update zrok NodeJS-SDK's package.json version based on current zrok repo git tag
if: github.ref == 'refs/heads/main'
run: |
cd ${{ runner.workspace }}/${{ github.event.repository.name }}/sdk/nodejs/sdk
npm version ${{ steps.tag.outputs.TAG }} --no-git-tag-version --allow-same-version
@ -54,6 +55,7 @@ jobs:
git commit -am "Update package.json version to ${{ steps.tag.outputs.TAG }}" || echo "No changes to commit"
- name: Push changes to zrok NodeJS-SDK's package.json
if: github.ref == 'refs/heads/main'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
@ -88,9 +90,8 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: NPM Publish
if: github.ref == 'refs/heads/main'
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
if: |
startsWith(github.ref, 'refs/tags/')