Skip to content

Commit

Permalink
build: setup build system
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukinoko-kun committed Jul 24, 2024
1 parent e1bdaaf commit 1a49b29
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Deploy Demo
on:
push:
branches: ["main"]
paths:
- ".github/workflows/demo.yaml"
- "apps/demo/**"
- "pnpm-lock.yaml"
- "package.json"
- "lib/**"
workflow_dispatch:

permissions:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: npm

on:
release:
types: [created]

jobs:
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: lts/*
cache: pnpm
registry-url: https://registry.npmjs.org/
- name: Prettier check
run: pnpm exec prettier --check .
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
4 changes: 1 addition & 3 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.github/
test/
dist/
*.js
apps/
.DS_Store
.editorconfig
pnpm-lock.yaml
Expand Down

0 comments on commit 1a49b29

Please sign in to comment.