Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
17 changes: 14 additions & 3 deletions packages/modal/.release-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
7 changes: 7 additions & 0 deletions packages/modal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/modal/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading