Semantic Release Nexus Plugin
This project is a plugin for the Semantic Release framework which will allow you to publish an arbitrary file type to a raw Nexus repository. This is great for pushing binaries, tars, zips, etc. to your Nexus instance for usage throughout your environment.
yarn add semantic-release-nexus --dev
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"semantic-release-nexus",
{
"nexusHost": "https://some-host.yourdomain.com",
"nexusPath": "your-super-cool-project",
"assets": [
{
"path": "dist/your-super-cool-project-*-darwin.tar.gz"
},
{
"path": "dist/your-super-cool-project-*-linux.tar.gz"
},
{
"path": "dist/your-super-cool-project-*-windows.zip"
}
]
}
]
]
}
Authentication is not required but basic auth is supported via environment variables. You may set NEXUS_USER
and NEXUS_PASSWORD
(alternatively replacing NX
for NEXUS
) environment variables for basic auth.
Variable | Description |
---|---|
NEXUS_USER /NX_USER |
The Username of the service account used for basic auth. |
NEXUS_PASSWORD /NX_PASSWORD |
The Password of the service account used for basic auth. |
NEXUS_HOST /NX_HOST |
The hostname or CNAME of the Nexus instance. |
NEXUS_PATH /NX_PATH |
The Path/Directory/Group to host your assets. |
Option | Description | Default |
---|---|---|
nexusHost |
The URL of the Nexus Host. | NX_URL or NEXUS_URL environment variable. |
nexusPath |
The group or path prefix to host the packages in Nexus. | NX_PATH or NEXUS_PATH environment variable. |
assets |
An array of files to upload to the release. See assets. | - |
Can be a glob or and Array
of
globs and Object
s with the following properties:
Property | Description | Default |
---|---|---|
path |
Required. A glob to identify the files to upload. | - |
name |
The name of the downloadable file on the GitHub release. | File name extracted from the path . |