This project uses Conventional Commits to automate versioning and changelog generation via semantic-release.
Every commit message must follow this format:
<type>(<optional scope>): <description>
| Type | Description | Release |
|---|---|---|
feat |
A new feature | Minor version bump |
fix |
A bug fix | Patch version bump |
perf |
A performance improvement | Patch version bump |
chore |
Maintenance / tooling | No release |
docs |
Documentation only | No release |
refactor |
Code change, no feature or fix | No release |
style |
Formatting, whitespace | No release |
test |
Adding or updating tests | No release |
ci |
CI/CD changes | No release |
build |
Build system changes | No release |
A breaking change triggers a major version bump regardless of the commit type. Indicate it in one of two ways:
Option 1 — ! suffix on the type:
feat!: remove deprecated myRef prop
Option 2 — BREAKING CHANGE footer:
feat: remove deprecated myRef prop
BREAKING CHANGE: The `myRef` prop has been removed. Use the standard `ref` prop instead.
feat: add support for placeholder color prop
fix: label stays in dirty position after clear()
chore: upgrade tsup to v9
docs: update README installation steps
# Install dependencies
npm install
# Run tests
npm test
# Type-check
npm run type-check
# Build the library
npm run build
# Start the demo dev server (http://localhost:5173)
npm run demo- Fork the repository and create a branch from
master. - Make your changes, following the Conventional Commits format for every commit.
- Ensure
npm test,npm run type-check, andnpm run buildall pass locally. - Open a pull request against
master. The CI workflow will run automatically.
Automated npm publishing is handled by semantic-release via the release.yml workflow. It requires a NPM_TOKEN secret in the GitHub repository settings.
Steps to configure:
- Log in to npmjs.com and go to Access Tokens in your account settings.
- Click Generate New Token and choose Granular Access Token (or Classic → Automation type).
- Grant the token read and write access to the
react-native-floating-labelspackage. - Copy the generated token.
- In the GitHub repository, go to Settings → Secrets and variables → Actions.
- Click New repository secret, name it
NPM_TOKEN, and paste the token value.
The GITHUB_TOKEN secret is automatically provided by GitHub Actions and requires no manual setup.
Releases are fully automated. When a PR is merged to master:
- The
CIworkflow runs tests, type-check, and build. - On success, the
Releaseworkflow runssemantic-release. semantic-releaseanalyzes commits since the last release, determines the next version, publishes to npm, creates a GitHub release, and commits an updatedCHANGELOG.mdback tomaster.
You do not need to manually bump versions or tag releases.