Skip to content

🔥 Remove console log #127

🔥 Remove console log

🔥 Remove console log #127

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: NPM Package
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
# Install Pnpm & Node
- name: Install Pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
# Install dependencies with pnpm
- name: Install Dependencies
run: pnpm install
# build & test
- name: Build
run: pnpm run build # TODO: Change "build" to "test" when tests are ready
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
publish:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
# Install Pnpm & Node
- name: Install Pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
# Install dependencies with pnpm
- name: Install Dependencies
run: pnpm install
# setup git config (for auto-version bumping)
- name: Setup git config
run: |
git config user.name "GitHub actions"
git config user.email "<>"
# deploy to npm
- name: Deploy
run: pnpm run deploy
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}