Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

semantic-release(-image)

A generally-up-to-date image containing semantic-release and most official and community plugins, good for use in containerized CI/CD pipelines!

Update: Several of the community plugins have started exhibiting dependency resolution issues with semantic-release, so I have commented them out in the interest of keeping the image updated to the core semantic-release builds. Please log an issue if this causes a problem, or feel free to fork this repo to have your own customized semantic-release image.

Usage

The image assumes that /source is the working directory, and has semantic-release as the default ENTRYPOINT, so you can verify things are working with:

docker run --rm -ti -v .:/source -e GITHUB_TOKEN=YOUR-TOKEN-HERE jaredreisinger/semantic-release --dry-run

(with your token in place of YOUR-TOKEN-HERE, of course)... and you should see the regular dry-run output from semantic-release. Depending on the plugins your .releaserc specifies, you may need other environment variables defined.

In a CI/CD pipeline

Using Drone as an example, you can create a release step as simply as:

# . . .
steps:
  # . . .
  - name: release
    image: jaredreisinger/semantic-release
    environment:
      GITHUB_TOKEN:
        from_secret: github_token

(Assuming here that github_token has already been set up as a Drone repository or organization secret.) If you have a .releaserc file, your chosen plugins and configuration will magically be used. Also note that Drone binds the source directory to the image and sets that directory as the current working one, so there's no need to specifically mount into /source. This should be true of any Docker-based CI/CD.

Notes

Given the sheer number of plugins, I've decided to simply include everything as "latest".

Even though normal Dockerfile practice is to combine RUN commands to reduce the number of layers, we take advantage of caching by separating these out, and attempting to put the more-stable and less-often-updated components first.

About

semantic-release, encapsulated in a Docker image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published