Skip to content

Commit c8197a4

Browse files
committed
ci: add workflow to publish to npm registry
1 parent 8216944 commit c8197a4

File tree

3 files changed

+1929
-2
lines changed

3 files changed

+1929
-2
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: pnpm/action-setup@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: lts/*
21+
registry-url: 'https://registry.npmjs.org'
22+
cache: 'pnpm'
23+
- run: pnpm install --frozen-lockfile
24+
- run: pnpm build
25+
- name: Release
26+
run: pnpm semantic-release
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
"homepage": "https://github.com/danielz0102/astro-eslint-setup",
2424
"author": "danielz0102",
2525
"license": "ISC",
26-
"packageManager": "pnpm@10.15.0",
26+
"packageManager": "pnpm@10.17.1",
2727
"devDependencies": {
2828
"@biomejs/biome": "2.2.4",
2929
"@types/node": "24.3.0",
30+
"semantic-release": "24.2.9",
3031
"tsup": "8.5.0",
3132
"typescript": "5.9.2"
3233
},

0 commit comments

Comments
 (0)