Template for releasing to GitHub Packages
repo
, read:packages
, write:packages
, & delete:packages
npm login --registry=https://npm.pkg.github.com
Create .npmrc
in the root of the project with the following:
@calizahq:registry=https://npm.pkg.github.com
Then add the package with yarn
:
yarn add @calizahq/<YOUR_PACKAGE_NAME>
Any push/merge to main
will trigger a GitHub Action that will build, test, version, & release the package. It is configured to version the package based on Conventional Commits. Commits that do not conform to the patterns below (i.e. chore:
) will still run tests, but they will not release a new version.
Commit Prefix | Description |
---|---|
fix: |
Patch version (1.0.0 -> 1.0.1 ) |
feat: |
Minor version (1.0.0 -> 1.1.0 ) |
BREAKING CHANGE: (in footer) |
Major version (1.0.0 -> 2.0.0 ) |
To add:
yarn link
in packageyarn link @calizahq/<YOUR_PACKAGE_NAME>
in applicationTo remove:
yarn unlink
in packageyarn unlink @calizahq/<YOUR_PACKAGE_NAME>
in applicationyarn install --force
to reinstall package from GitHubUnfortunately, symlinks do not work in React Native, so we have to use a different pattern. See here for more information.