Refactor output directory from "dist" to "bin" #19
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: 'Package & Deploy to NPM ' | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: corepack enable | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Set up Git user | |
run: | | |
git config --global user.email "admin@threenineco.uk" | |
git config --global user.name "threenine" | |
- name: Release | |
run: pnpm standard-version | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Build project | |
run: pnpm run build | |
- name: npm Login | |
run: npm login --auth-type npm --token ${{ secrets.NPM_TOKEN }} | |
- name: Publish to NPM | |
run: pnpm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |