-
-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (42 loc) ยท 1.41 KB
/
publication.yml
File metadata and controls
51 lines (42 loc) ยท 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Publication ๐ฆ
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
environment: npm
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.event.release.tag_name }}
- name: Verify tag matches package.json
run: |
TAG_NAME="${{ github.event.release.tag_name }}"
TAG_VERSION="${TAG_NAME#v}"
PKG_VERSION=$(jq -r .version package.json)
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
echo "Error: ํ๊ทธ ๋ฒ์ ๊ณผ package.json ๋ฒ์ ์ด ์ผ์นํ์ง ์์ต๋๋ค."
echo "tag version: ${TAG_VERSION}"
echo "package.json version: ${PKG_VERSION}"
exit 1
fi
echo "โ
๋ฒ์ ์ผ์น ํ์ธ: ${TAG_VERSION}"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Build package
run: |
bun install --frozen-lockfile
bun run prepare
bun run build:lib
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: https://registry.npmjs.org
- name: Publish to npm
run: npm publish --provenance --ignore-scripts # --provenance: OIDC ์ธ์ฆ ๋ฐ ์ถ์ฒ ์ฆ๋ช
, --ignore-scripts: skip prepare script (already ran in Build package step)