Skip to content

Cut a release

Cut a release #37

Workflow file for this run

name: Cut a release
on:
workflow_dispatch:
inputs:
versionLevel:
description: 'The semVer level of the version'
required: true
default: 'minor'
type: choice
options:
- major
- minor
- patch
baseBranch:
description: 'Branch to release from'
required: true
type: choice
default: 'main'
options:
- main
- release-0.64
- release-0.52
- release-0.47
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out code from ${{ github.event.inputs.baseBranch }}
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.baseBranch }}
fetch-depth: 0
- name: Retrieve last tag
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- name: Bump version with level ${{ github.event.inputs.baseBranch }}
uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: ${{ github.event.inputs.versionLevel }}
- name: Push the new version
uses: actions-ecosystem/action-push-tag@v1
with:
tag: ${{ steps.bump-semver.outputs.new_version }}