Skip to content

Commit

Permalink
ci: run build in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rwv committed Oct 9, 2024
1 parent 00b548c commit cc65a3b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches:
- all-tools
pull_request:
branches:
- all-tools
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: ESLint Check
run: pnpm run lint-check

- name: Format Check
run: pnpm run format-check

- name: TypeScript Check
run: pnpm run type-check

- name: Run build
run: pnpm run build

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.0",
"private": true,
"type": "module",
"packageManager": "[email protected]",
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
Expand All @@ -13,7 +14,9 @@
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"lint-check": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore",
"format": "prettier --write src/",
"format-check": "prettier --check src/",
"prepare": "husky"
},
"dependencies": {
Expand Down

0 comments on commit cc65a3b

Please sign in to comment.