Skip to content

Commit 3ecd315

Browse files
committed
ci: create release workflow
Signed-off-by: Michael Molisani <[email protected]>
1 parent 3e5f334 commit 3ecd315

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/release.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Nx Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dry-run:
7+
required: true
8+
type: boolean
9+
default: true
10+
description: This should be a dry run release where no changes are committed/applied.
11+
12+
permissions:
13+
actions: read
14+
contents: write
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
fetch-tags: true
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: "npm"
29+
30+
- run: npm ci --legacy-peer-deps
31+
- uses: nrwl/nx-set-shas@v4
32+
33+
- run: npx nx release --yes ${{ inputs.dry-run && '--dry-run' }}
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

nx.json

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
"version": {
5151
"conventionalCommits": true
5252
},
53+
"changelog": {
54+
"workspaceChangelog": {
55+
"createRelease": "github"
56+
}
57+
},
5358
"git": {
5459
"commitMessage": "chore(release): {version}"
5560
}

0 commit comments

Comments
 (0)