Skip to content

Commit

Permalink
setup CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoishin committed Jan 12, 2025
1 parent 86f4c49 commit 1af72e4
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-test:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
node-version:
- 22.11.0
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm test
- run: pnpm build

publish-alpha:
needs: build-test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref_name == 'main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.11.0
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm version 0.0.0-alpha.${{ github.sha}} --no-git-tag-version
- run: pnpm publish --tag alpha
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
],
"scripts": {
"build": "tsup",
"prepublishOnly": "npm run build",
"test": "vitest"
"prepublishOnly": "pnpm build",
"test": "vitest",
"typecheck": "tsc -b ."
},
"dependencies": {
"@inquirer/prompts": "^7.2.1",
Expand All @@ -37,6 +38,7 @@
"typescript-eslint": "^8.19.1",
"vitest": "^2.1.8"
},
"packageManager": "[email protected]",
"engines": {
"node": "^22.11.0"
},
Expand Down

0 comments on commit 1af72e4

Please sign in to comment.