Build & Publish to NPM #57
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: Build & Publish to NPM | |
on: [workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Enable Corepack for Yarn 4 | |
run: | | |
corepack enable | |
- name: Install 馃捇 | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install | |
- name: Build 馃敡 | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: build | |
- name: Publish package on NPM 馃摝 | |
run: npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |