Skip to content

Release

Release #5

#
# Copyright (c) 2019-2022 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
name: Release
on:
# Trigger the workflow on tag creation only
push:
tags:
- '7.*.*'
workflow_dispatch:
inputs:
version:
description: 'The version that is going to be released. Should be in format 7.y.z'
required: true
jobs:
announce:
runs-on: ubuntu-22.04
steps:
- name: Generate tag utilities
id: TAG_UTIL
run: |
if [[ ${GITHUB_REF#refs/tags/} =~ 7.*.* ]]; then
echo "chectl_version=$(cat VERSION)" >> $GITHUB_OUTPUT
echo "gh_tag=/tag/$(cat VERSION)" >> $GITHUB_OUTPUT
echo "MM_ANNOUNCE=true" >> "$GITHUB_ENV"
elif [[ ${{ github.event.inputs.version }} =~ 7.*.* ]]; then
echo "chectl_version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
echo "gh_tag=/tag/${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
echo "MM_ANNOUNCE=true" >> "$GITHUB_ENV"
else
echo "MM_ANNOUNCE=false" >> "$GITHUB_ENV"
fi