forked from gandalan/idas-client-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.09 KB
/
publish-weblibs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 }}