CI/CD Mode
Automate releases in your CI/CD pipelines.
Overview
Shipmark's CI mode enables fully automated, non-interactive releases. Perfect for GitHub Actions, GitLab CI, Jenkins, and any other CI/CD system.
$ shipmark release --ci auto
SHIPMARK_VERSION=1.3.0
SHIPMARK_TAG=v1.3.0
SHIPMARK_BUMP=minor
CI Mode Options
| Option | Description |
|---|---|
--ci auto |
Auto-detect bump from commits (breaking→major, feat→minor, else→patch) |
--ci patch |
Force patch bump (x.x.X) |
--ci minor |
Force minor bump (x.X.0) |
--ci major |
Force major bump (X.0.0) |
--ci prerelease |
Increment prerelease version |
Output Variables
CI mode outputs variables for downstream pipeline use:
SHIPMARK_VERSION=1.3.0 # New version number
SHIPMARK_TAG=v1.3.0 # Git tag name
SHIPMARK_BUMP=minor # Bump type used
GitHub Actions Example
name: Release
on:
workflow_dispatch:
inputs:
bump:
description: 'Version bump type'
required: true
default: 'auto'
type: choice
options:
- auto
- patch
- minor
- major
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Shipmark
run: npm install -g @grazulex/shipmark
- name: Create Release
run: shipmark release --ci ${{ inputs.bump }}
env:
GIT_AUTHOR_NAME: github-actions
GIT_AUTHOR_EMAIL: github-actions@github.com
GIT_COMMITTER_NAME: github-actions
GIT_COMMITTER_EMAIL: github-actions@github.com
Dry Run in CI
Preview what would happen without making changes:
$ shipmark release --ci auto --dry-run