Skip to content

Merge pull request #735 from swc-project/dependabot/npm_and_yarn/babe… #1321

Merge pull request #735 from swc-project/dependabot/npm_and_yarn/babe…

Merge pull request #735 from swc-project/dependabot/npm_and_yarn/babe… #1321

Workflow file for this run

name: CI
on:
push:
branches: [master, develop]
pull_request:
jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: stable - ${{ matrix.os }} - node@18
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: 'Install dependencies'
run: pnpm install -r
- name: Build TypeScript
run: pnpm build
- name: Test bindings
run: |
pnpm test
pnpm test:jest
pnpm test:module
publish:
name: Publish
if: "startsWith(github.event.head_commit.message, 'chore(release): publish')"
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: npm-cache-${{ matrix.os }}-node@18
- name: 'Install dependencies'
run: |
npm install -g corepack
corepack enable
pnpm install
- name: Build TypeScript
run: |
pnpm build
rm ./packages/**/tsconfig.project.tsbuildinfo
- name: Lerna publish
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npx lerna publish from-package --no-verify-access --yes
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}