Skip to content

Merge pull request #451 from gandalan/snyk-fix-ed359c3f8e93a9119751c6… #162

Merge pull request #451 from gandalan/snyk-fix-ed359c3f8e93a9119751c6…

Merge pull request #451 from gandalan/snyk-fix-ed359c3f8e93a9119751c6… #162

name: Publish WebLibs (NPM)
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'WebLibs/**'
- '.github/workflows/publish-weblibs.yml'
env:
WEBLIBS_DIR: WebLibs
jobs:
build-and-publish-weblibs:
if: github.repository_owner == 'gandalan'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Automated Version Bump for ${{ env.WEBLIBS_DIR }}
uses: phips28/gh-action-bump-version@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGEJSON_DIR: ${{ env.WEBLIBS_DIR }}
with:
tag-prefix: WebLibs_
commit-message: 'CI: WebLibs version bump to {{version}}'
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
- run: npm ci
working-directory: ${{ env.WEBLIBS_DIR }}
- run: npm run svelte-check
working-directory: ${{ env.WEBLIBS_DIR }}
- run: npm run lint:prod
working-directory: ${{ env.WEBLIBS_DIR }}
- run: npm publish
working-directory: ${{ env.WEBLIBS_DIR }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}