From 7e4bed17daaa99d4bc522672b89151a6036fcd20 Mon Sep 17 00:00:00 2001 From: Michael Molisani Date: Thu, 24 Oct 2024 10:19:56 -0400 Subject: [PATCH] ci: create release workflow Signed-off-by: Michael Molisani --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ nx.json | 5 +++++ 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..80cf1fe --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/nx.json b/nx.json index abcbbc2..b71599b 100644 --- a/nx.json +++ b/nx.json @@ -50,6 +50,11 @@ "version": { "conventionalCommits": true }, + "changelog": { + "workspaceChangelog": { + "createRelease": "github" + } + }, "git": { "commitMessage": "chore(release): {version}" }