diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10caee9a..261cbbee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,13 +39,33 @@ jobs: run: pnpm install - name: Build run: pnpm -r build - - name: Consume changesets and publish + - name: Consume changesets run: | npx changeset version - npx changeset publish --tag "$DIST_TAG" - git push origin main --follow-tags + + # Bump the monorepo root version so tags always advance. + # The root is private (never published) and drives the v* tag. + npm version minor --no-git-tag-version + git commit --amend --no-edit + + - name: Publish env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} DIST_TAG: ${{ inputs.distTag }} + run: npx changeset publish --tag "${DIST_TAG}" --no-git-tag + + - name: Push version commit + run: git push origin main + + - name: GitHub Release & Tag + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + TAG="v$(jq -r '.version' package.json)" + git tag "$TAG" + git push origin "$TAG" + gh release create "$TAG" \ + --title "$TAG" \ + --generate-notes \ + --verify-tag diff --git a/package.json b/package.json index e4037c25..49292cfd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,7 @@ { "name": "devtools-monorepo", + "version": "10.6.1", + "private": true, "type": "module", "scripts": { "build": "pnpm -r build",