This workflow will release your Bump Version project. That means it will bump the version according to your release-type, create a Git tag, and create a GitHub release with an optional changelog.
A .bumpversion.cfg needs to be located inside working-directory (repository root by default) to use this workflow.
Moreover, prepare a github-username, a github-email and a github-token to push to GitHub.
This workflow is built from other composite actions listed below:
name: Release
on:
workflow_dispatch:
inputs:
release-type:
description: "Scope of the release."
type: choice
required: true
default: patch
options:
- patch
- minor
- major
jobs:
call-workflow-passing-data:
name: Release
uses: bakdata/ci-templates/.github/workflows/bump-version-release.yaml@main
with:
release-type: "${{ github.event.inputs.release-type }}"
changelog: false # (Optional) Default is true
changelog-config: "./.github/changelog-config.json" # (Optional)
working-directory: "." # (Optional) Default is .
secrets:
github-username: "${{ secrets.GH_USERNAME }}"
github-email: "${{ secrets.GH_EMAIL }}"
github-token: "${{ secrets.GH_TOKEN }}"
use-output-of-workflow:
runs-on: ubuntu-latest
needs: call-workflow-passing-data
steps:
- run: echo Bumped Version from ${{ needs.call-workflow-passing-data.outputs.old-version }} to ${{ needs.call-workflow-passing-data.outputs.release-version }}| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| changelog | boolean | false | true |
Create changelog for release. |
| release-type | string | true | Scope of the release (major, minor or patch). | |
| working-directory | string | false | "." |
Working directory containing .bumpversion.cfg. (Default is .) |
| OUTPUT | VALUE | DESCRIPTION |
|---|---|---|
| old-version | "${{ jobs.release.outputs.old-version }}" |
The old version in your .bumpversion.cfg file. |
| release-version | "${{ jobs.release.outputs.release-version }}" |
The bumped version. |
| SECRET | REQUIRED | DESCRIPTION |
|---|---|---|
| github-email | true | The GitHub email for committing the changes. |
| github-token | true | The GitHub token for committing the changes. |
| github-username | true | The GitHub username for committing the changes. |