🔥 Remove console log #127
This file contains hidden or 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
| # 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}} |