CI: WebLibs version bump to WebLibs_1.5.0 #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 lint:prod | |
working-directory: ${{ env.WEBLIBS_DIR }} | |
- run: npm publish | |
working-directory: ${{ env.WEBLIBS_DIR }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |