Skip to content

Commit 4e9f30e

Browse files
authored
Merge pull request #9 from lynx-community/chore/init-release
chore: init release
2 parents 036c5cb + 27888c6 commit 4e9f30e

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions: {}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
environment: npm
15+
concurrency:
16+
group: ${{ github.workflow }}
17+
cancel-in-progress: false
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
id-token: write
22+
23+
steps:
24+
- name: Checkout Repo
25+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
26+
with:
27+
# This makes Actions fetch all Git history so that Changesets can generate changelogs
28+
fetch-depth: 0
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
32+
with:
33+
node-version: 22
34+
package-manager-cache: false
35+
36+
- name: Install Dependencies
37+
run: |
38+
npm i -g corepack npm@latest
39+
npm --version
40+
corepack enable
41+
pnpm install
42+
43+
- name: Create Release Pull Request or Publish to npm
44+
id: changesets
45+
uses: changesets/action@v1
46+
with:
47+
publish: pnpm run release
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"check": "biome check --write",
2020
"dev": "rslib build --watch",
2121
"format": "biome format --write",
22-
"test": "vitest"
22+
"test": "vitest",
23+
"release": "pnpm run build && pnpm changeset publish"
2324
},
2425
"devDependencies": {
2526
"@biomejs/biome": "2.2.4",

0 commit comments

Comments
 (0)