semantic-release

Add the install commands to every release that semantic-release publishes on GitHub.

The @semantic-release/github plugin of semantic-release builds the release body from releaseBodyTemplate, a Lodash template that defaults to the generated notes. It needs version 9.1.0 or later of the plugin. Keep the notes and add the install section after them, with your repository in place of YOUR/REPO. In .releaserc.yaml:

YAML
plugins:
  - "@semantic-release/commit-analyzer"
  - "@semantic-release/release-notes-generator"
  - - "@semantic-release/github"
    - releaseBodyTemplate: |
        <%= nextRelease.notes %>

        ## Install

        **macOS & Linux**

        ```sh
        curl -fsSL https://installer.dev/YOUR/REPO/install.sh | sh
        ```

        **Windows** (PowerShell)

        ```powershell
        irm https://installer.dev/YOUR/REPO/install.ps1 | iex
        ```

plugins replaces the default plugin list. Keep every plugin your configuration already has, and add the options only to the @semantic-release/github entry. To install exactly this release, add ?version=<%= nextRelease.gitTag %> to each URL.

Check the result

A dry run checks the configuration and prints the notes without publishing anything:

Shell
npx semantic-release --dry-run

The dry run skips the publish step of @semantic-release/github, so the full release body shows first on the next published release.