Skip to content

Commit 87b3b0e

Browse files
committed
ci: publish on CI
1 parent abfaf92 commit 87b3b0e

File tree

4 files changed

+19
-70
lines changed

4 files changed

+19
-70
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Publish Any Commit
2+
on: [push, pull_request]
3+
4+
permissions: {}
5+
6+
jobs:
7+
release:
8+
uses: sxzz/workflows/.github/workflows/release-commit.yml@v1
9+
with:
10+
compact: true

.github/workflows/release.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
11
name: Release
22

3-
permissions:
4-
contents: write
5-
63
on:
74
push:
85
tags:
96
- 'v*'
107

118
jobs:
129
release:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
18-
19-
- name: Set node
20-
uses: actions/setup-node@v4
21-
with:
22-
node-version: lts/*
23-
24-
- run: npx changelogithub
25-
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
uses: sxzz/workflows/.github/workflows/release.yml@v1
11+
with:
12+
publish: true
13+
permissions:
14+
contents: write
15+
id-token: write

.github/workflows/unit-test.yml

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,55 +7,5 @@ on:
77
branches: [main]
88

99
jobs:
10-
lint:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
15-
- name: Install pnpm
16-
uses: pnpm/[email protected]
17-
18-
- name: Set node
19-
uses: actions/setup-node@v4
20-
with:
21-
node-version: lts/*
22-
cache: pnpm
23-
24-
- name: Install
25-
run: pnpm i
26-
27-
- name: Lint
28-
run: pnpm run lint
29-
30-
- name: Typecheck
31-
run: pnpm run typecheck
32-
33-
test:
34-
runs-on: ${{ matrix.os }}
35-
36-
strategy:
37-
matrix:
38-
os: [ubuntu-latest, windows-latest]
39-
node: [18, 20, 22]
40-
fail-fast: false
41-
42-
steps:
43-
- uses: actions/checkout@v4
44-
45-
- name: Install pnpm
46-
uses: pnpm/[email protected]
47-
48-
- name: Set node ${{ matrix.node }}
49-
uses: actions/setup-node@v4
50-
with:
51-
node-version: ${{ matrix.node }}
52-
cache: pnpm
53-
54-
- name: Install dependencies
55-
run: pnpm i
56-
57-
- name: Build
58-
run: pnpm run build
59-
60-
- name: Test
61-
run: pnpm run test
10+
unit-test:
11+
uses: sxzz/workflows/.github/workflows/unit-test.yml@v1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"dev": "tsdown --watch",
6767
"test": "vitest",
6868
"typecheck": "tsc --noEmit",
69-
"release": "bumpp && pnpm publish",
69+
"release": "bumpp",
7070
"prepublishOnly": "pnpm run build"
7171
},
7272
"peerDependencies": {

0 commit comments

Comments
 (0)