Node.js Package Publish #11
Workflow file for this run
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
| name: Node.js Package Publish | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| lint_and_test: | |
| name: Lint and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version-file: "package.json" | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Lint | |
| run: bun run --filter "*" lint | |
| - name: Test | |
| run: bun tun --filter "*" test | |
| build: | |
| name: Build and Publish | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint_and_test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version-file: "package.json" | |
| registry-url: "https://registry.npmjs.org" | |
| scope: "@simplecomponent" | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build | |
| run: bun run --filter "*" build | |
| - name: Publish | |
| run: bun publish --filter "*" --access public --tag latest | |
| env: | |
| NPM_CONFIG_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |