Release & Publish to NPM #39
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 | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
- name: Install the dependencies | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install # will run `yarn install` command | |
- name: Initialize Git user | |
run: | | |
git config --global user.email "azeezat94@gmail.com" | |
git config --global user.name "Release Workflow" | |
- name: Initialize npm config | |
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Release | |
run: npm run release --ci | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: End Message | |
run: echo "All done" |