Skip to content

Release & Publish to NPM #6

Release & Publish to NPM

Release & Publish to NPM #6

Workflow file for this run

name: Release & Publish to NPM
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Configure Git User
run: |
git config --global user.name "Mustapha GHLISSI"
git config --global user.email "ghlissi.mustapha@gmail.com"
- name: Configure NPM
run: npm config set //registry.npmjs.org/:_authToken $NPM_PUBLISH_TOKEN
env:
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Build
run: npm run build
- name: Start release to NPM registry
run: npm run release --ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: End of release to NPM registry
run: echo "Released successfully !"