diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10c6bf4..58e54cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,11 @@ jobs: - name: Install dependencies run: npm install + # We've configured nx to update version numbers in the primary package.json files (rather than in the dist builds to be published) + # Therefore this step must be done before build so that the new version numbers are copied to dist/package.json + - name: Update version numbers in the persistant package.json files + run: npx nx release version + - name: Build package run: npx nx build @ethnolib/language-chooser-react-mui @@ -33,16 +38,19 @@ jobs: - name: Run tests run: npx nx test @ethnolib/find-language - - name: Set name and email for git so we can tag + - name: Set name and email for git so we can commit and tag run: | git config user.name "Github Actions" - git config user.email " no-reply@ethnolib-build.com" + git config user.email "no-reply@ethnolib-build.com" - name: Publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: npx nx release --yes + - name: Push the release commit (with version number update and changelog) + run: git push + - name: Push the release tag run: git push --tags diff --git a/nx.json b/nx.json index df6915b..b527692 100644 --- a/nx.json +++ b/nx.json @@ -31,15 +31,19 @@ ], "release": { "projectsRelationship": "independent", - "git": { - "commit": false - }, "version": { "generatorOptions": { - "packageRoot": "{projectRoot}/dist" + "packageRoot": "{projectRoot}" }, "conventionalCommits": true }, + "changelog": { + "projectChangelogs": { + "renderOptions": { + "authors": false + } + } + }, "projects": [ "@ethnolib/language-chooser-react-mui", "@ethnolib/find-language"