Skip to content

Patch Version

Patch Version #50

Workflow file for this run

on:
workflow_dispatch: # allows manual triggering
inputs:
level:
description: 'Release a patch version on the release branch, `auto` follow the last version level.'
required: true
default: 'auto'
type: choice
options:
- 'auto'
- 'beta'
- 'rc'
- 'patch'
permissions:
contents: write
name: "Patch Version"
jobs:
release_level:
runs-on: ubuntu-latest
outputs:
level: ${{ steps.concrete_level.outputs.level }}
steps:
- name: Release branch check
if: startsWith(github.ref, 'refs/heads/release-') != true
run: |
echo "You should only run this workflow on the release branch."
exit 1
- uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
- id: auto_detect
if: ${{ github.event.inputs.level == 'auto' || github.event.inputs.level == '' }}
run: echo "level=$(git describe --tags --abbrev=0 | grep -o "rc\|beta")" >> $GITHUB_OUTPUT
- id: concrete_level
run: |
level=${{ steps.auto_detect.outputs.level }}
echo "level=${level:=${{inputs.level}}}" >> $GITHUB_OUTPUT
call-workflow-passing-data:
needs: release_level
uses: RibirX/rclog/.github/workflows/release-version.yml@main
with:
level: ${{ needs.release_level.outputs.level }}
ref: ${{ github.ref }}
merge_changelog: ${{ needs.release_level.outputs.level == 'patch' }}
toolchain: stable
secrets:
CRATE_RELEASE_TOKEN: ${{ secrets.CRATE_RELEASE_TOKEN }}
GITHUB_RELEASE_TOKEN: ${{ secrets.RIBIR_RELEASE }}