From feeb8195cfdc8786ce8487485a264883025c9f5a Mon Sep 17 00:00:00 2001 From: Davide Segullo Date: Sat, 26 Oct 2024 23:29:10 +0200 Subject: [PATCH] fix: :green_heart: better build --- .github/workflows/release-preview.yml | 10 +++++++--- .github/workflows/release-production.yml | 10 +++++++--- nx.json | 5 ++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index 0d3c7c8..9c5d490 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -68,7 +68,11 @@ jobs: - name: Run Nx release version run: pnpm release -d false - # Step 10: Run publish + # Step 10: Run the build for the affected changes + - name: Run build + run: pnpm build + + # Step 11: Run publish - name: Publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -78,12 +82,12 @@ jobs: # which is set up by `setup-node` action. run: npx nx release publish --verbose --tag $RELEASE_TAG - # Step 11: Upload artifacts + # Step 12: Upload artifacts - name: Upload artifacts uses: actions/upload-artifact@v4 with: path: './dist' - # Step 12: Clean up dist directory + # Step 13: Clean up dist directory - name: Cleanup dist directory run: rm -rf ./dist # Remove the dist directory to start fresh diff --git a/.github/workflows/release-production.yml b/.github/workflows/release-production.yml index 98a2369..82a1c79 100644 --- a/.github/workflows/release-production.yml +++ b/.github/workflows/release-production.yml @@ -66,7 +66,11 @@ jobs: - name: Run Nx release version run: pnpm release -d false - # Step 10: Run publish + # Step 10: Run the build for the affected changes + - name: Run build + run: pnpm build + + # Step 11: Run publish - name: Publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -76,12 +80,12 @@ jobs: # which is set up by `setup-node` action. run: pnpx nx release publish --verbose - # Step 11: Upload artifacts + # Step 12: Upload artifacts - name: Upload artifacts uses: actions/upload-artifact@v4 with: path: './dist' - # Step 12: Clean up dist directory + # Step 13: Clean up dist directory - name: Cleanup dist directory run: rm -rf ./dist # Remove the dist directory to start fresh diff --git a/nx.json b/nx.json index 3e818a9..390a220 100644 --- a/nx.json +++ b/nx.json @@ -78,11 +78,10 @@ "projects": ["*", "!nextjs", "!vue3"], "projectsRelationship": "independent", "version": { + "conventionalCommits": true, "generatorOptions": { "packageRoot": "dist/packages/{projectName}", - "currentVersionResolver": "git-tag", - "specifierSource": "conventional-commits", - "fallbackCurrentVersionResolver": "disk" + "updateDependents": "auto" } }, "changelog": {