Skip to content

Commit ae4fc42

Browse files
authored
chore(release): refine release configs (#15)
1 parent 5dbd1e8 commit ae4fc42

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
11
name: Release
22

33
on:
4-
# push:
5-
# branches: [ main ]
64
workflow_dispatch:
75

86
jobs:
97
release:
8+
name: Release
109
runs-on: ubuntu-latest
1110
steps:
1211
- name: Checkout
13-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1413
with:
1514
fetch-depth: 0
1615
- name: Setup Node.js
17-
uses: actions/setup-node@v2
16+
uses: actions/setup-node@v3
1817
with:
1918
node-version: "lts/*"
19+
- uses: pnpm/action-setup@v2
20+
name: Install pnpm
21+
id: pnpm-install
22+
with:
23+
run_install: false
24+
- name: Get pnpm store directory
25+
id: pnpm-cache
26+
shell: bash
27+
run: |
28+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
29+
- uses: actions/cache@v3
30+
name: Setup pnpm cache
31+
with:
32+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
33+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34+
restore-keys: |
35+
${{ runner.os }}-pnpm-store-
2036
- name: Install dependencies
21-
run: npm ci
22-
- name: Release to npm
37+
run: pnpm install
38+
- name: Release
2339
env:
2440
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2541
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
26-
run: npx semantic-release
42+
run: rm -rf dist && pnpm run pre-release && pnpm run semantic-release

.releaserc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@
2323
"commitsSort": ["subject", "scope"]
2424
}
2525
}
26+
],
27+
"@semantic-release/npm",
28+
[
29+
"@semantic-release/github",
30+
{
31+
"assets": ["dist/**"],
32+
"successComment": false,
33+
"releaseLabels": ["<%= nextRelease.version %>"],
34+
"addReleases": "bottom"
35+
}
2636
]
2737
]
2838
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "json-kit",
3-
"version": "0.1.0",
2+
"name": "@kit-p/json-kit",
3+
"version": "0.0.1",
44
"description": "JSON Toolkit for (de)serialization | (un)minification | (de)compression",
55
"engines": {
66
"node": ">=16",

0 commit comments

Comments
 (0)