Skip to content

Commit 45a9531

Browse files
committed
ci: add release
1 parent 2b15531 commit 45a9531

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch: {}
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
id-token: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install pnpm
22+
uses: pnpm/[email protected]
23+
24+
- name: Set node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: lts/*
28+
cache: pnpm
29+
registry-url: 'https://registry.npmjs.org'
30+
31+
- run: npx changelogithub
32+
continue-on-error: true
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Install Dependencies
37+
run: pnpm i
38+
39+
- name: Build
40+
run: pnpm build
41+
42+
- name: Publish to NPM
43+
run: pnpm -r publish --access public --no-git-checks
44+
env:
45+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
46+
NPM_CONFIG_PROVENANCE: true
File renamed without changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"lint": "eslint .",
2626
"play": "npm -C playground run dev",
2727
"test": "vitest",
28-
"release": "pnpm run build && bumpp packages/*/package.json --all -x 'pnpm run changelog' && pnpm publish --filter=\"./packages/*\"",
28+
"release": "bumpp -r -x 'pnpm run changelog'",
2929
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
3030
},
3131
"devDependencies": {

0 commit comments

Comments
 (0)