From 8f64cd0a161ef4a6bf9938d28256411c43e983c3 Mon Sep 17 00:00:00 2001 From: Moritz Becker Date: Wed, 28 Aug 2024 23:54:49 +0200 Subject: [PATCH] fix(project): npm/git release mechanism --- .github/workflows/version-release.yaml | 17 +++++++++++++---- nx.json | 5 +++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/version-release.yaml b/.github/workflows/version-release.yaml index 0389329..b52f0a7 100644 --- a/.github/workflows/version-release.yaml +++ b/.github/workflows/version-release.yaml @@ -4,14 +4,17 @@ on: push: branches: - main - paths: - - 'packages/**' + tags: + - 'v*.*.*' jobs: versioning: name: Versioning and Publishing to NPM environment: packages-releasing runs-on: ubuntu-22.04 + permissions: + contents: read + id-token: write steps: - name: Checkout code @@ -37,8 +40,14 @@ jobs: git config --global user.email "<>" git config --global user.name "github-actions[bot]" - - name: Bump versions and publish to NPM - run: npx nx release -y + - name: Print Environment Info + run: npx nx report + shell: bash + + - name: Publish packages + run: npx nx release publish + shell: bash env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_CONFIG_PROVENANCE: true diff --git a/nx.json b/nx.json index 22e2d95..b256d85 100644 --- a/nx.json +++ b/nx.json @@ -26,6 +26,11 @@ "version": { "conventionalCommits": true }, + "changelog": { + "workspaceChangelog": { + "createRelease": "github" + } + }, "conventionalCommits": { "types": { "docs": {