Skip to content

Commit

Permalink
chore: setup ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ydcjeff committed Feb 6, 2024
1 parent 6be32e5 commit af7c58d
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ci

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node_version: [lts/*]
include:
- os: macos-latest
node_version: lts/*
- os: windows-latest
node_version: lts/*
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: latest

- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: pnpm

- run: pnpm i
- run: pnpm t
- run: pnpm run typecheck
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release

on:
push:
tags:
- 'v*'

jobs:
release:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- run: pnpm i
- run: pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true

0 comments on commit af7c58d

Please sign in to comment.