semantic-release-sfdx

1.0.1 • Public • Published

semantic-release-sfdx

semantic-release plugin for publishing an SFDX package

Prerequisites

You must have SFDX installed and connected to your DevHub (see Authorization in the Salesforce DX Developer Guide).

Configuration

To enable this plugin, simply add the following to your package.json or release configuration file.

{
  "release": {
    "plugins": ["semantic-release-sfdx"]
  }
}

DevHub

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).

Advanced Configuration

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,
      },
    ],
  ],
}

verifyConditions

To disable the verification of your SFDX project, DevHub and installationkey:

{
  "release": {
    "plugins": [
      "semantic-release-sfdx",
      {
        "verifyConditions": false
      }
    ]
  }
}

Example

See a second generation package being released with this plugin here.

Credits

Thanks to https://github.com/carlos-cubas/semantic-release-gcp.git for kicking off point

Package Sidebar

Install

npm i semantic-release-sfdx

Weekly Downloads

34

Version

1.0.1

License

MIT

Unpacked Size

9.07 kB

Total Files

8

Last publish

Collaborators

  • leboff