https://github.com/screwdriver-cd/tmpl-semantic-release
https://github.com/screwdriver-cd/tmpl-semantic-release
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/screwdriver-cd/tmpl-semantic-release
- Owner: screwdriver-cd
- License: bsd-3-clause
- Created: 2017-09-21T17:48:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-07-24T21:29:51.000Z (11 months ago)
- Last Synced: 2025-07-25T03:20:07.344Z (11 months ago)
- Homepage: https://cd.screwdriver.cd/pipelines/344
- Size: 10.7 KB
- Stars: 1
- Watchers: 15
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Template: Semantic Release
[![Build Status][status-image]][status-url]
A template that performs a semantic-release for NPM-based modules, using the [semantic-release](https://www.npmjs.com/package/semantic-release) NPM module.
## Usage
### Secrets
The following secrets are needed in order to execute correctly:
* `NPM_TOKEN` - NPM token. Used for publishing the updated version to the NPM Registry.
* `GH_TOKEN` - Github token. Used for tagging the correct commit SHA with the respective version.
#### Example
```
# screwdriver.yaml
---
jobs:
main:
secrets:
# These secrets are defined in the Pipeline page
- NPM_TOKEN
- GH_TOKEN
template: screwdriver-cd/semantic-release@stable
```
### What the Template Does
This template executes the following steps:
* `check_prerequisite`
* `install_binaries`
* `publish`
#### check_prerequisite
This step ensures that the `NPM_TOKEN` and `GH_TOKEN` secret variables are all set. However, this step does *not* verify nor validate the values; it only checks that they are populated.
#### install_binaries
This step installs the necessary binaries and libraries in order to perform all the template operations.
Overriding this step may cause unwanted side effects during the publish.
#### publish
This step is what performs the semantic release operations via the [semantic-release](https://www.npmjs.com/package/semantic-release) NPM module.
[status-image]: https://cd.screwdriver.cd/pipelines/344/badge
[status-url]: https://cd.screwdriver.cd/pipelines/344