chore(scripts): fix eslint-config legacy package json generation #133
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: CI | |
permissions: | |
id-token: write | |
contents: write | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
ci: | |
name: Continuous Integration & Deployment | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9.x | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: "pnpm" | |
# --- Install, build, and test. | |
- run: pnpm install | |
- run: pnpm build | |
- run: pnpm lint:ci | |
- run: pnpm test:ci | |
# --- Publish to private registry on main branch. | |
- if: github.event_name == 'push' | |
run: pnpm publish:ci --registry https://npm.hsjm.dev | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN_PRIVATE}} | |
# --- Publish to NPM registry on main branch. (Only on tags) | |
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
run: pnpm publish:ci --registry https://registry.npmjs.org | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |