@rob.hameetman/semantic-release-config v1.0.0-alpha.1
📦 @rob.hameetman/semantic-release-config
§1: Overview
§2: Getting Started
Follow these steps to get the project up and running on your local machine:
1. Prerequisites
- Node v20+
- NPM v9+
2. Installation
git clone git@github.com:RobHameetman/semantic-release-config
cd semantic-release-config
npm run setup
3. Editor Configuration
For VSCode, save the following as editor.code-workspace
in the project root
directory:
{
"folders": [
{
"path": "."
}
],
"settings": {
"editor.rulers": [
80,
120
],
"eslint.nodeEnv": "development",
"files.autoSave": "onFocusChange",
"yaml.format.enable": true,
"yaml.format.singleQuote": true,
},
}
§3: Development
NPM Commands
npm run build
: Create a production build artifact.npm run format
: Perform static analysis and auto-fix errors.npm run reset
: Perform a fullnode_modules/
reset.npm test
: Execute the Jest test suite.
Environment Variables
General Options
Variable | Description |
---|---|
RELEASE_PLUGIN_PRESET | Change the preset used for plugins. Defaults to conventionalcommits .^1 |
RELEASE_PUBLISH_FROM_DIST | Set to true if your build pipeline copies package.json into your dist folder. |
RELEASE_DEBUG | Enable debug mode in semantic-release . |
RELEASE_REPOSITORY_URL | Set the repo URL used by semantic-release . Defaults to your settings in package.json . |
RELEASE_DRY_RUN | Perform a dry run of the release. |
RELEASE_LOCALLY | Run semantic-release outside of your CI/CD pipeline. |
Release Rules
Variable | Description |
---|---|
RELEASE_SKIP_README_UPDATES | Set to true to skip patch increments for README updates if they don't appear in your private registry. |
RELEASE_DEPRECATE_AS_MINOR_VERSION | If true the deprecate: ... commit type will increment a minor version instead of a patch version. |
RELEASE_VERSION_AS_TYPE | Allows you to use a specific version as a commit type (e.g. 1.2.1(release): ... ). |
Custom Commands
| Variable | Description |
|--------------------------------------|-------------------------------------------------------------------------------------|
| RELEASE_EXEC_ANALYZE_COMMITS_CMD
| A custom shell command to execute during the analyze commits step. |
| RELEASE_EXEC_GENERATE_NOTES_CMD
| A custom shell command to execute during the generate notes step. |
| RELEASE_EXEC_ADD_CHANNEL_CMD
| A custom shell command to execute during the add channel step. |
| RELEASE_EXEC_VERIFY_ARTIFACTS_CMD
| A custom shell command to execute during the verify release step. |
| RELEASE_EXEC_CWD
| The path to use as current working directory when executing the shell commands.^2 |
| RELEASE_EXEC_FAIL_CMD
| A custom shell command to execute during the fail step. |
| RELEASE_EXEC_PREPARE_CMD
| A custom shell command to execute during the prepare step. |
| RELEASE_EXEC_PUBLISH_CMD
| A custom shell command to execute during the publish step. |
| RELEASE_EXEC_SHELL
| The shell to use to run the command. If true
, runs file inside of a shell.^3 |
| RELEASE_EXEC_SUCCESS_CMD
| A custom shell command to execute during the success step. |
| RELEASE_EXEC_VERIFY_CONDITIONS_CMD
| A custom shell command to execute during the verify condition step. |
Configuration-specific
Variable | Config | Description |
---|---|---|
RELEASE_CANARY_BRANCH | Canary | The name of your pre-release branch. |
RELEASE_CANARY_CHANNEL | Canary | The name of the channel your pre-releases are tagged by. |
RELEASE_BRANCHES | Modular | Used as the base URL for fetching data from the backend. Add more env variables below. |
RELEASE_MAIN_IS_LATEST | Modular | Used as the base URL for fetching data from the backend. Add more env variables below. |
^1: Release rules for the angular
preset are already included.
^2: This path is relative to the path from which semantic-release is running.
For example if semantic-release runs from /my-project
and execCwd
is
set to buildScripts
then the shell command will be executed
from /my-project/buildScripts
.
^3: Uses /bin/sh
on UNIX and cmd.exe
on Windows. A different shell can be
specified as a string. The shell should understand the -c
switch on UNIX
or /d /s /c
on Windows.
§4: Testing
This project uses the following tiers of testing:
- Unit & Integration Tests: Use
npm run test
to run all tests.
These commands accept additional inputs following a --
modifier as in the
common use-case examples below:
npm run test -- --watch
: Watch for changes and re-run all tests.npm run test -- src/path/to/test.spec.ts
: Run tests in a specific test file.
§5: Publishing
Creating and merging PRs will create new package versions that you can monitor by vising the Actions tab in Github.
Channels
alpha
: Used for manual testing in other packagesbeta
: Used for UAT and testing by external consumersnext
: Everything that will be included in the next major version release
Versioning
This project uses SemVer for versioning. For the versions available, see the tags on this repository.
An beta
pre-release version will be published whenever you create a PR and
incremented as you update your changes. Once the PR is merged, a release version
is created automatically. This is handled with semantic-release
.
Major versions should have a corresponding release in Github. Click here to create a new release once your version meets acceptance criteria.
§6: Contact
For inquiries and additional information, please reach out to:
Rob Hameetman
Front End Architect | Chicago, IL
engineering@robhameetman.com
§7: License
Distributed under the MIT License.
See the LICENSE file for details.
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago