From a10e1f5f11bac63320ca704163716eb240c4f844 Mon Sep 17 00:00:00 2001 From: Gabriel Taveira Date: Tue, 19 May 2026 13:20:35 -0300 Subject: [PATCH 1/2] chore(modal): sync version to 7.0.1 and broaden release-it commit filter - Bump packages/modal/package.json to 7.0.1 to align with what was actually published to npm during the 7.0.1 ship (the git push to main was blocked by branch protection, fixed in #186 via GH_PAT). Without this, the next release-it run would compute its base from 7.0.0 and try to re-publish 7.0.1 (403 duplicate). - Prepend a 7.0.1 entry to CHANGELOG.md describing the CI sync. - Loosen .release-it.js commitFilter to also count any commit with a BREAKING CHANGE note, in addition to (modal)-scoped commits. This ensures unscoped feat!/fix! or commits with a BREAKING CHANGE footer still trigger a release, while unrelated chore/deps noise is ignored. --- packages/modal/.release-it.js | 17 ++++++++++++++--- packages/modal/CHANGELOG.md | 7 +++++++ packages/modal/package.json | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/modal/.release-it.js b/packages/modal/.release-it.js index 5244fd2a..76c80b37 100644 --- a/packages/modal/.release-it.js +++ b/packages/modal/.release-it.js @@ -54,10 +54,21 @@ export default { ], }, /** - * Only include commits with (modal) in the message - * @param {{ header: string }} commit + * Include commits scoped to (modal) and any commit carrying a + * BREAKING CHANGE note (regardless of scope). This ensures that + * unscoped `feat!:` / `fix!:` commits or commits with a + * `BREAKING CHANGE:` footer still trigger a release, while + * unrelated chore/deps noise without (modal) scope is ignored. + * @param {{ header?: string, notes?: Array<{ title?: string, text?: string }> }} commit */ - commitFilter: (commit) => commit.header.includes("(modal)"), + commitFilter: (commit) => { + if (commit.header?.includes("(modal)")) return true; + if ( + commit.notes?.some((n) => /BREAKING[- ]CHANGE/i.test(n.title ?? "")) + ) + return true; + return false; + }, }, }, git: { diff --git a/packages/modal/CHANGELOG.md b/packages/modal/CHANGELOG.md index 25c8fb08..80ec407a 100644 --- a/packages/modal/CHANGELOG.md +++ b/packages/modal/CHANGELOG.md @@ -1,5 +1,12 @@ # 🦄 Magic Modal Changelog 🪄 +## 7.0.1 (2026-05-19) + +### :curly_loop: Continuous Integrations :curly_loop: + +* Fixed release-it git push + docs caching (#186) +* Align package.json version with npm publish 7.0.1 + ## 7.0.0 (2026-05-19) ### ⚠ BREAKING CHANGES diff --git a/packages/modal/package.json b/packages/modal/package.json index 1e6d1bb7..1330118c 100644 --- a/packages/modal/package.json +++ b/packages/modal/package.json @@ -1,6 +1,6 @@ { "name": "react-native-magic-modal", - "version": "7.0.0", + "version": "7.0.1", "type": "module", "description": "A magic modal that can be used imperatively from anywhere! 🦄", "main": "./dist/index.cjs", From e5f07fe4725fa6b7098c0036c2fc0a9186c17918 Mon Sep 17 00:00:00 2001 From: Gabriel Taveira Date: Tue, 19 May 2026 13:22:08 -0300 Subject: [PATCH 2/2] chore(ci): skip release workflow when no new version to publish --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e8b44d7..90f84627 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,7 +58,31 @@ jobs: - name: 🛠️ Build run: pnpm run build + - name: 🔎 Determine next version + id: next-version + working-directory: packages/modal + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # release-it prints the next version it WOULD publish. If it matches + # the version already on disk (== last published), there is nothing + # to ship. We disable npm/github side-effects on this probe so it + # only computes the version from conventional commits. + CURRENT=$(node -p "require('./package.json').version") + NEXT=$(pnpm exec release-it --release-version --ci --no-npm --no-github 2>&1 | grep -E '^[0-9]+\.[0-9]+\.[0-9]+' | tail -n 1 | tr -d '[:space:]') + echo "current=$CURRENT" + echo "next=$NEXT" + echo "current=$CURRENT" >> "$GITHUB_OUTPUT" + echo "next=$NEXT" >> "$GITHUB_OUTPUT" + if [ -z "$NEXT" ] || [ "$NEXT" = "$CURRENT" ]; then + echo "skip=true" >> "$GITHUB_OUTPUT" + echo "No new version to release. Skipping." + else + echo "skip=false" >> "$GITHUB_OUTPUT" + fi + - name: 🚀 Release + if: steps.next-version.outputs.skip != 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}