semantic-release plugin for publishing an SFDX package
You must have SFDX installed and connected to your DevHub (see Authorization in the Salesforce DX Developer Guide).
To enable this plugin, simply add the following to your package.json
or release configuration file.
{
"release": {
"plugins": ["semantic-release-sfdx"]
}
}
By default this plugin uses the DevHub which is set in your defaultdevhubusername
sfdx config.
To use another DevHub, set the environment variable SFDX_DEFAULTDEVHUBUSERNAME
(see Salesforce CLI Setup Guide).
static config via package.json
{
"release": {
"plugins": [
[
"semantic-release-sfdx",
{
"codecoverage": true,
"promote": true,
"installationkey": "mysecretkey"
}
]
]
}
}
dynamic config via release.config.js
module.exports = {
plugins: [
[
'semantic-release-sfdx',
{
codecoverage: process.env.PROMOTE_PACKAGE_VERSION === 'true',
promote: process.env.PROMOTE_PACKAGE_VERSION === 'true',
installationkey: process.env.INSTALLATIONKEY,
},
],
],
}
To disable the verification of your SFDX project, DevHub and installationkey:
{
"release": {
"plugins": [
"semantic-release-sfdx",
{
"verifyConditions": false
}
]
}
}
See a second generation package being released with this plugin here.
Thanks to https://github.com/carlos-cubas/semantic-release-gcp.git for kicking off point