> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# trustedshops-public/semantic-release

Run semantic-release inside your pipeline with ease.


## Commands

### create_changelog_config_github

Create .releaserc.json for usage with github, including CHANGELOG.md generation. This configuration is more advanced and creates a git tag, CHANGELOG.md and github release containing the release notes.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag_format` | string | ${version} | Tag format (make sure to escape dollar signs) |

### create_minimal_config_github

Create minimal .releaserc.json for usage with github. This configuration is very minimal and creates a git tag and github release containing the release notes.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag_format` | string | ${version} | Tag format (make sure to escape dollar signs) |

### execute

Execute semantic-release


### install

Install semantic-release and dependencies using npm


| Parameter | Type | Default | Description |
|---|---|---|---|
| `additional_packages` | string |  | Additional npm packages to install, seperated by space |

### verify_config

Verify semantic-release configuration file exists


| Parameter | Type | Default | Description |
|---|---|---|---|
| `config_file` | string | .releaserc.json | Configuration file those existence should be checked |

## Jobs

### with-existing-config

Install and run semantic-release with existing configuration files


| Parameter | Type | Default | Description |
|---|---|---|---|
| `additional_packages` | string |  | Additional npm packages to install, seperated by space |
| `attach_workspace` | boolean | false | Boolean for whether or not to attach to an existing workspace.
 |
| `config_file` | string | .releaserc.json | Configuration file to check |
| `validate_config_file` | boolean | false | Validate the presence of the configuration file in the project |
| `workspace_root` | string | . | Workspace root path that is either an absolute path or a path relative to the working directory.
 |

### with_changelog_github_config

Install and run semantic-release with changelog configuration


| Parameter | Type | Default | Description |
|---|---|---|---|
| `attach_workspace` | boolean | false | Boolean for whether or not to attach to an existing workspace.
 |
| `tag_format` | string | ${version} | Tag format (make sure to escape dollar signs) |
| `workspace_root` | string | . | Workspace root path that is either an absolute path or a path relative to the working directory.
 |

### with_existing_config

Install and run semantic-release with existing configuration files


| Parameter | Type | Default | Description |
|---|---|---|---|
| `additional_packages` | string |  | Additional npm packages to install, seperated by space |
| `attach_workspace` | boolean | false | Boolean for whether or not to attach to an existing workspace.
 |
| `config_file` | string | .releaserc.json | Configuration file to check |
| `validate_config_file` | boolean | false | Validate the presence of the configuration file in the project |
| `workspace_root` | string | . | Workspace root path that is either an absolute path or a path relative to the working directory.
 |

### with_minimal_github_config

Install and run semantic-release with minimal configuration


| Parameter | Type | Default | Description |
|---|---|---|---|
| `attach_workspace` | boolean | false | Boolean for whether or not to attach to an existing workspace.
 |
| `tag_format` | string | ${version} | Tag format (make sure to escape dollar signs) |
| `workspace_root` | string | . | Workspace root path that is either an absolute path or a path relative to the working directory.
 |

## Executors

### default

Default executor using cimg/node.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | 22.19 | Pick a specific circleci/node image variant: https://hub.docker.com/r/cimg/node/tags
 |

## Examples

### job-with-existing-config

Run semantic release with existing configuration on the main branch

```yaml
version: '2.1'
orbs:
  semantic-release: trustedshops-public/semantic-release@<version>
workflows:
  continious:
    jobs:
      - semantic-release/with_existing_config:
          config_file: .releaserc.json
          filters:
            branches:
              only:
                - main
          name: semantic-release
          validate_config_file: true
  version: 2
```

### job_with_changelog_github_config

Run semantic release with changelog github config on main branch

```yaml
version: '2.1'
orbs:
  semantic-release: trustedshops-public/semantic-release@<version>
workflows:
  continious:
    jobs:
      - semantic-release/with_changelog_github_config:
          filters:
            branches:
              only:
                - main
          name: semantic-release
  version: 2
```

### job_with_existing_config

Run semantic release with existing configuration on the main branch

```yaml
version: '2.1'
orbs:
  semantic-release: trustedshops-public/semantic-release@<version>
workflows:
  continious:
    jobs:
      - semantic-release/with_existing_config:
          config_file: .releaserc.json
          filters:
            branches:
              only:
                - main
          name: semantic-release
          validate_config_file: true
  version: 2
```

### job_with_minimal_github_config

Run semantic release with minimal github config on main branch

```yaml
version: '2.1'
orbs:
  semantic-release: trustedshops-public/semantic-release@<version>
workflows:
  continious:
    jobs:
      - semantic-release/with_minimal_github_config:
          filters:
            branches:
              only:
                - main
          name: semantic-release
  version: 2
```