Skip to content

Release GoFSUtil

Release GoFSUtil #34

Workflow file for this run

name: Release GoFSUtil
# Invocable as a reusable workflow
# Can be manually triggered
on: # yamllint disable-line rule:truthy
workflow_call:
workflow_dispatch:
inputs:
option:
description: 'Select version to release'
required: true
type: choice
default: 'minor'
options:
- major
- minor
- patch
- "n-1/n-2 patch (Provide input in the below box)"
version:
description: "Patch version to release. example: 2.1.x (For n-1 and n-2 versions only)"
required: false
type: string
repository_dispatch:
types: [release-go-libs]
jobs:
process-inputs:
name: Process Inputs
runs-on: ubuntu-latest
outputs:
processedVersion: ${{ steps.set-version.outputs.versionEnv }}
steps:
- name: Process input
id: set-version
shell: bash
run: |
if [[ "${{ github.event.inputs.version }}" != "" && "${{ github.event.inputs.option }}" == "n-1/n-2 patch (Provide input in the below box)" ]]; then
# if both version and option are provided, then version takes precedence i.e. patch release for n-1/n-2
echo "versionEnv=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
exit 0
fi
if [[ "${{ github.event.inputs.option }}" != "n-1/n-2 patch (Provide input in the below box)" ]]; then
# if only option is provided, then option takes precedence i.e. minor, major or patch release
echo "versionEnv=${{ github.event.inputs.option }}" >> $GITHUB_OUTPUT
exit 0
fi
# if neither option nor version is provided, then minor release is taken by default (Auto-release)
echo "versionEnv=minor" >> $GITHUB_OUTPUT
csm-release:
needs: [process-inputs]
uses: harishp8889/test-common-github-actions/.github/workflows/csm-release-libs.yaml@main
name: Release Go Client Libraries
with:
version: "${{ needs.process-inputs.outputs.processedVersion }}"
secrets: inherit