Skip to content

Commit d2fa6f9

Browse files
committed
feat: init pub
1 parent e082f6f commit d2fa6f9

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: ['**']
5+
pull_request:
6+
branches: ['**']
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
20+
- uses: pnpm/action-setup@v2
21+
with:
22+
version: 8
23+
24+
- name: Get pnpm store directory
25+
shell: bash
26+
run: |
27+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
28+
29+
- uses: actions/cache@v3
30+
with:
31+
path: ${{ env.STORE_PATH }}
32+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
33+
restore-keys: |
34+
${{ runner.os }}-pnpm-store-
35+
36+
- name: Install dependencies
37+
run: pnpm install
38+
39+
- name: Run tests
40+
run: pnpm test
41+
42+
- name: Semantic Release
43+
uses: cycjimmy/semantic-release-action@v4
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
46+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,10 @@
5151
"overrides": {
5252
"@octokit/webhooks": "12.3.1"
5353
}
54+
},
55+
"release": {
56+
"branches": [
57+
"main"
58+
]
5459
}
5560
}

0 commit comments

Comments
 (0)