Skip to content
GitHub Action for Semantic Release
JavaScript
Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
docs
src
.editorconfig
.gitattributes
.gitignore feat: come a new action Oct 17, 2019
.npmignore
CODE_OF_CONDUCT.md
LICENSE
README.md style(*): unify quotes Nov 1, 2019
action.yml
index.js feat: come a new action Oct 17, 2019
package-lock.json
package.json
release.config.js

README.md

Semantic Release Action

semantic-release npm license

GitHub Action for Semantic Release.

Usage

Step1: Set any Semantic Release Configuration in your repository.

Step2: Add Secrets in your repository for the Semantic Release Authentication Environment Variables.

Step3: Add a Workflow File to your repository to create custom automated processes.

  • inputs:
    • branch: [Optional] The branch on which releases should happen. It will override the branch attribute in your configuration file. If the attribute is not configured on both sides, the default is master.
    • semantic_version: [Optional] Specify specifying version range for semantic-release. If no version range is specified, semantic-release@^15 will be used by default.
    • extra_plugins: [Optional] Extra plugins for pre-install. You can also specify specifying version range for the extra plugins if you prefer.
    • dry_run: [Optional] Whether to run semantic release in dry-run mode. It will override the dryRun attribute in your configuration file.
  • outputs:
    • new_release_published: Whether a new release was published. true or false
    • new_release_version: Version of the new release
    • new_release_major_version: Major version of the new release
    • new_release_minor_version: Minor version of the new release
    • new_release_patch_version: Patch version of the new release

A simple example

steps:
  - name: Semantic Release
    uses: cycjimmy/semantic-release-action@v2
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

An advanced example

steps:
  - name: Semantic Release
    uses: cycjimmy/semantic-release-action@v2
    id: semantic   # Need an `id` for output variables
    with:
      branch: master
      semantic_version: 15.13.28
      # You can specify specifying version range for the extra plugins if you prefer.
      extra_plugins: |
        @semantic-release/git
        @semantic-release/changelog@3.0.0
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
      
  - name: Do something when a new release published
    if: steps.semantic.outputs.new_release_published == 'true'
    run: ...

CHANGELOG

You can’t perform that action at this time.