fix(ci): use npm pkg delete
to remove private
instead of jq
#3216
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: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm install | |
- run: npm run build | |
- name: remove `private=true` from package.json | |
run: | | |
npm pkg delete private | |
- 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/* | |
- run: npm install | |
- run: npm run eslint | |
- run: npm 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: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm install | |
- run: npm run build | |
- run: npm 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: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm install | |
- run: npm run build | |
- run: npm 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 |