Release & Publish to NPM #6
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: 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 --legacy-peer-deps | |
- name: Configure Git User | |
run: | | |
git config --global user.name "Mustapha GHLISSI" | |
git config --global user.email "[email protected]" | |
- name: Configure NPM | |
run: npm config set //registry.npmjs.org/:_authToken $NPM_PUBLISH_TOKEN | |
env: | |
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
- name: Release | |
run: npm run release --ci --otp=<code> | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
- name: End of release | |
run: ech "Success !" |