Socket
Book a DemoInstallSign in
Socket

semantic-release-sfdx2

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semantic-release-sfdx2

Set of semantic-release plugins to publish SFDX Package

1.6.0
latest
Source
npmnpm
Version published
Weekly downloads
9
800%
Maintainers
1
Weekly downloads
 
Created
Source

semantic-release-sfdx

semantic-release plugin for publishing an SFDX package

Aside

This is a fork of https://github.com/leboff/semantic-release-sfdx with the following changes:

  • Updated to use the latest version of sfdx-node
  • ESM module support
  • Add more options for configuration

Prerequisites

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

Installation

npm install -D semantic-release-sfdx2

or using yarn:

yarn add -D semantic-release-sfdx2

Configuration

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

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

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

You can configure the plugin by providing an object instead of a string in the plugins array, available options are:

  • codecoverage - boolean - whether to run tests with code coverage
  • promote - boolean - whether to promote the package version
  • installationkey - string - the installation key for the package
  • versionCreateWait - number - the wait time for package version creation. Defaults to 15 minutes.
  • definitionfile - string - the path to the definition file
  • devhubusername - string - the dev hub username, if you wish to override the default
  • skipvalidation - boolean - whether to skip validation
  • skipancestorcheck - boolean - whether to skip ancestor check

static config via package.json

{
  "release": {
    "plugins": [
      [
        "semantic-release-sfdx2",
        {
          "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
      }
    ]
  }
}

Credits

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

Thanks to https://github.com/leboff/semantic-release-sfdx for creating the original package

Keywords

sfdx

FAQs

Package last updated on 13 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.