Package-V simplifies the management and versioning of NPM packages by automating the publishing process to the GitHub Registry. When a pull request is merged, Package-V automatically handles version increments based on the type of changes (minor, major, or breaking) and updates the package.json.
By delegating version management and package publishing to Package-V, you save time and reduce the risk of human error, ensuring a smooth and efficient workflow for your NPM projects.
Provide step-by-step instructions on how to install and set up Package-V in a GitHub repository.
Go to the GitHub Marketplace or directly to the GitHub App's page. If you are looking for Package-V:
Once you’re on the GitHub App page, you’ll see an "Install" button in the upper-right corner. Click this button to start the installation process.
Choose Installation ScopeYou will now be prompted to choose where you want to install the app:
Before finalizing the installation, GitHub will display the permissions the app is requesting. For Package-V, this might include permissions to:
package.json
).After reviewing permissions, confirm the installation by clicking the "Install" or "Authorize" button. This will complete the installation process.
Configuration (If Applicable)Once installed, some GitHub Apps may have additional configuration steps. For Package-V:
package.json
follows the correct naming format (@username/package-name
or @organization/package-name
).fix/
, feature/
, !feat/
) are in place to enable automatic versioning.Now that the GitHub App is installed, it’s ready to use! For Package-V, it will automatically manage versioning and publishing once you start merging pull requests into your specified branches (development, QA, or main).
The initial version is determined by the version specified in the package.json file when the package is created. Subsequent versions are automatically updated based on the branch prefix of the merged PR. Supported branch prefixes and their effects are:
Example: fix/principal-title → Version updates from 1.0.0 to 1.0.1.
Example: !feature/login-refactor → Version updates from 1.2.3 to 2.0.0.
Example: feature/login → Version updates from 1.1.0 to 1.2.0.
Example:
PR: feature/login <- fix/title
current package version: 1.2.0
Next package version: 1.2.1-alpha
A similar behaviour will happens when a when a PR be closed in the ("develop", "dev", "development"), qa (qa) branches; the sufix that is oging to be added is going to be "beta":
Example:
PR: develop <- feature/login
current package version: 1.2.1
Next package version: 1.3.0-beta
If you want to skip the automatic versioning and publishing process for a specific pull request, simply add the label:
Label: packagev:skip
This ensures that the version update and publishing process are bypassed when the pull request is merged.
If you want to set a custom version for the release, use the following label in the pull request:
Label: packagev:x.x.x
For example, to set the version to 1.2.3
, add the label: packagev:1.2.3
. This allows you to define a custom version number when the PR is merged.
The package is published automatically when a Pull Request is merged.
Finally, when a PR is closed and the base branch is qa and the headed branch is develop ("develop", "dev", "development"), the version of the package is going to keep the same.
Example:
PR: qa <- develop
current package version: 1.3.0-beta
Next package version: 1.3.0-beta
In addition, similar behaviour is done when a PR is closed in the main (main or master) branch, if this is the base branch, all sufixes in the version will be removed and the merged version will be kept without modification to publish this one to be used in production.
Example:
PR: main <- qa
current package version: 1.3.0-beta
Next package version: 1.3.0
If you ever need to uninstall or manage the app (e.g., change the repositories it has access to):