Skip to content

Merge pull request #271 from Saibamen/fix_commit-message #79

Merge pull request #271 from Saibamen/fix_commit-message

Merge pull request #271 from Saibamen/fix_commit-message #79

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@v3
- 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@v3
with:
node-version: 18
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
working-directory: ${{ env.WEBLIBS_DIR }}
- run: npm publish
working-directory: ${{ env.WEBLIBS_DIR }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}