Cut a release #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |