Close #1506: PNPM monorepo with pnpm-lock.yaml
files.
#3244
Workflow file for this run
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 | |
on: | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'test/**' | |
- 'test-error/**' | |
- 'test-esm/**' | |
- 'package.json' | |
- 'tsconfig.json' | |
- 'rollup.config.js' | |
- '.github/workflows/build.yml' | |
jobs: | |
Build-and-Upload-to-pkg-pr-new-and-artifactory: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- run: pnpm install --force | |
- run: pnpm run build | |
- name: remove `private=true` from package.json | |
run: | | |
jq 'del(.private)' package.json > package.json.tmp | |
mv package.json.tmp package.json | |
- name: upload to pkg.pr.now | |
run: npx pkg-pr-new publish --compact | |
- name: Upload tgz for Artifactory | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-result | |
path: | | |
*.tgz | |
src | |
lib | |
Check-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- run: pnpm install --force | |
- run: pnpm run eslint | |
- run: pnpm run prettier | |
NodeJS: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x, 22.x, lts/*] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- run: pnpm install --force | |
- run: pnpm run build | |
- run: pnpm run test | |
Bun: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- run: pnpm install --force | |
- run: pnpm run build | |
- run: pnpm run test:bun | |
action-timeline: | |
needs: | |
- Build-and-Upload-to-pkg-pr-new-and-artifactory | |
- Check-format | |
- NodeJS | |
- Bun | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Kesin11/actions-timeline@v2 |