Skip to content

Publish to NPM

Publish to NPM #5

Workflow file for this run

name: Publish to npm
on: workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Fetch complete history
run: git fetch --prune --unshallow
- name: Get latest tag
id: get_tag
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Update package.json version
run: |
echo "{\"version\": \"$(echo $TAG | sed 's/v//')\"}" > projects/khiops-webcomponent/src/package.json
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build:webcomponents
- name: Publish to npm
run: npm publish
working-directory: dist/khiops-webcomponent
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}