Skip to content

⚙️ Github composite action for installing the Salesforce CLI and related plugins

License

Notifications You must be signed in to change notification settings

svierk/sfdx-cli-setup

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

⚙️ SFDX CLI Setup

This repository implements a simple GitHub composite action for installing the Salesforce CLI and related plugins. The CLI installation is done via npm.

Usage

In a GitHub workflow, the use of the action after the initial checkout step and selecting the Node.js version to be used could look like this:

jobs:
  validation:
    name: Validation
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Select Node Version
        uses: svierk/get-node-version@main

      - name: Install Dependencies
        run: npm ci

      - name: Install SF CLI
        uses: svierk/sfdx-cli-setup@main
        with:
          version: 2.32.8
          plugins: "['sfdx-git-delta', '@salesforce/plugin-packaging']"

Two optional parameters for the sfdx-cli-setup action can be used to set a specific CLI version if needed, in this example 2.32.8, as well as the CLI plugins to be installed, in this case sfdx-git-delta and @salesforce/plugin-packaging. The Node.js version in this example worflow is selected by using the action get-node-version that automatically pulls the version to be used from the package.json file of the SFDX project.

Releases

Latest release notes can be found on the release page.

License

The scripts and documentation in this project are released under the MIT License.