minor refactorings #90
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 and Deployment | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9.10.0 | |
run_install: true | |
- run: pnpm lint | |
name: Run lintings | |
- run: pnpm prettier:check | |
name: Run prettier checks | |
- run: pnpm test | |
name: Run tests | |
deploy: | |
name: Deploy package | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
always-auth: true | |
registry-url: https://registry.npmjs.org | |
scope: '@spearwolf' | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9.10.0 | |
run_install: true | |
- run: pnpm dist | |
name: Build package | |
- run: pnpm publish:pkg | |
name: Publish package | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |