Skip to content

Adapt @samchon/[email protected].

Adapt @samchon/[email protected]. #3175

Workflow file for this run

name: build
on:
pull_request:
paths:
- 'src/**'
- 'test/**'
- 'test-error/**'
- 'test-esm/**'
- 'package.json'
- '.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: |
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
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
- NodeJS
- Bun
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- uses: Kesin11/actions-timeline@v2