Skip to content

Commit

Permalink
ci: create release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Molisani <[email protected]>
  • Loading branch information
molisani committed Oct 24, 2024
1 parent 3e5f334 commit 7e4bed1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Nx Release

on:
workflow_dispatch:
inputs:
dry-run:
required: true
type: boolean
default: true
description: This should be a dry run release where no changes are committed/applied.

permissions:
actions: read
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- run: npm ci --legacy-peer-deps
- uses: nrwl/nx-set-shas@v4

- run: npx nx release --yes ${{ inputs.dry-run && '--dry-run' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
5 changes: 5 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
"version": {
"conventionalCommits": true
},
"changelog": {
"workspaceChangelog": {
"createRelease": "github"
}
},
"git": {
"commitMessage": "chore(release): {version}"
}
Expand Down

0 comments on commit 7e4bed1

Please sign in to comment.