@@ -5,14 +5,17 @@ on: ["push", "pull_request"]
55jobs :
66 build :
77 name : Build, test and eventually publish
8- runs-on : ubuntu-latest
8+ runs-on : ubuntu-22.04
99 env :
1010 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
1111 steps :
12- - uses : actions/checkout@v4
13- - uses : pnpm/action-setup@v3
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+
15+ - name : Set up pnpm
16+ uses : pnpm/action-setup@v3
1417 with :
15- version : 9.11 .0
18+ version : 9.15 .0
1619
1720 - name : Set up Node.js
1821 uses : actions/setup-node@v4
@@ -31,13 +34,41 @@ jobs:
3134 key : ${{ runner.os }}-eslint-${{ hashFiles('**/pnpm-lock.yaml', '**/eslint.config.mjs') }}
3235
3336 - name : Lint
34- run : pnpm run lint
37+ run : pnpm lint
3538
36- - name : Build
37- run : pnpm run build
39+ - name : Build packages
40+ run : pnpm build
41+
42+ - name : Build docs
43+ run : pnpm docs:build
3844
3945 - name : Publish
4046 if : startsWith(github.event.ref, 'refs/tags/v')
4147 env :
4248 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
4349 run : npx lerna publish from-package --yes
50+
51+ publish_release :
52+ if : startsWith(github.event.ref, 'refs/tags/v')
53+ name : Publish new release
54+ needs : build
55+ runs-on : ubuntu-latest
56+ steps :
57+ - name : Checkout repository
58+ uses : actions/checkout@v4
59+
60+ - name : Set up Node.js
61+ uses : actions/setup-node@v4
62+
63+ - name : Extract changes
64+ id : changelog
65+ uses : requarks/changelog-action@v1
66+ with :
67+ token : ${{ github.token }}
68+ tag : ${{ github.ref_name }}
69+
70+ - name : Publish release
71+ uses : softprops/action-gh-release@v1
72+ if : startsWith(github.ref, 'refs/tags/')
73+ with :
74+ body : ${{ steps.changelog.outputs.changes }}
0 commit comments