-
Notifications
You must be signed in to change notification settings - Fork 2
Release Process
This page documents how GhIcons moves from day-to-day development to a published release on npm. It is intended for maintainers and contributors who want to understand how the project is versioned and shipped.
feature branches / contributor PRs
↓
dev ← all active development happens here
↓ (deliberate merge when ready to release)
main ← triggers npm publish
| Branch | Purpose |
|---|---|
| dev | Default branch. All PRs from contributors target dev. Merges here trigger a dev build released on GitHub for testing. |
| main | Stable, production branch. Only updated intentionally by a maintainer. Merges here trigger a release to npm. |
| feature/* | Optional short-lived branches for larger batches of work (e.g. feature/adinkra-batch-2) |
GHIcons follows Semantic Versioning (MAJOR.MINOR.PATCH):
| Change type | Version bump | Example |
|---|---|---|
| Bug fix, SVG correction on an existing icon | Patch | 1.0.1 |
| New icons added (backwards compatible) | Minor | 1.1.0 |
| Breaking API change (renamed props, removed components) | Major | 2.0.0 |
The project is currently in pre-1.0 (0.x.x), which signals that the API may still change. The first stable release will be 1.0.0.
## Versioning
GHIcons follows [Semantic Versioning](https://semver.org/) (MAJOR.MINOR.PATCH):
| Change type | Version bump | Example |
|---|---|---|
| Bug fix, SVG correction on an existing icon | Patch | 1.0.1 |
| New icons added (backwards compatible) | Minor | 1.1.0 |
| Breaking API change (renamed props, removed components) | Major | 2.0.0 |
The project is currently in pre-1.0 (0.x.x), which signals that the API may still change. The first stable release will be 1.0.0.
Every push to dev automatically triggers the Dev Release GitHub Actions workflow. This:
- Builds the project
- Packages the
dist/output as a.zip - Publishes a pre-release on GitHub tagged
dev-v{version}-build.{run_number}
These builds are for maintainer testing only — not for end users. They allow you to verify changes work correctly in a real React project before merging to main.
- Go to Releases and download the latest
ghicons-dev-*.zip - Extract the zip
- In your test project, run:
npm install /path/to/extracted/folderA production release is triggered by merging dev into main. This should be a deliberate, intentional action, not a casual merge.
-
Ensure
devis stable, all passing CI checks, no known regressions -
Bump the version in
package.jsonon thedevbranch:
# Example: bumping from 0.3.0 to 0.4.0
npm version minor --no-git-tag-version
# or edit package.json manually-
Commit the version bump to
dev:
git add package.json pnpm-lock.yaml
git commit -m "chore: bump version to 0.4.0"
git push origin dev-
Open a PR from
dev→mainand merge it - The npm release GitHub Actions workflow triggers automatically and publishes to npm
- Tag the release on GitHub with release notes summarising what changed
When tagging a release on GitHub, use this format:
## What's new in v0.4.0
### New Icons
- GyeNyame — "Except God" (Adinkra)
- Sankofa — "Return and fetch it" (Adinkra)
- GhanaCedis — Ghana Cedis currency symbol
### Improvements
- Added `aria-label` support to all icon components
- Improved TypeScript types
### Bug Fixes
- Fixed incorrect viewBox on AkomaIcon
The npm publish workflow uses an NPM_TOKEN stored as a GitHub Actions secret. This token is scoped to the ghicons package on npm and is only accessible to repository maintainers.
If the publish fails, check:
- The
NPM_TOKENsecret is set and has not expired (Settings → Secrets and variables → Actions) - The version in
package.jsonhas been bumped — npm rejects publishing the same version twice - The build step completed successfully before the publish step
For urgent fixes to a production release (e.g. a broken icon or missing export that slipped through):
- Branch off
maindirectly:git checkout -b hotfix/fix-description main - Make the minimal fix
- Bump the patch version
- PR directly into
main - After merging, backport the fix to
devas well to keep branches in sync
Only maintainers with write access to main can trigger a production release. If you are a contributor and believe a fix is urgent enough to warrant a release, flag it by commenting on the relevant issue or opening a discussion.