Skip to content

Prerelease ~ Publish beta for patch #29

Prerelease ~ Publish beta for patch

Prerelease ~ Publish beta for patch #29

# (C) 2024 GoodData Corporation
name: Prerelease ~ Publish beta for patch
on:
workflow_dispatch:
inputs:
version:
required: true
description: "Specify the minor version to patch (example: 9.5.0)"
type: string
jobs:
check-input-version-param:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.check-input-version-param.outputs.branch }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check if branch for version exists
id: check-input-version-param
run: |
base="rel/${VERSION%.*}"
if git ls-remote --heads origin ${base} | grep ${base}; then
echo "Branch ${base} exists for version ${VERSION}"
echo "branch=${base}" >> $GITHUB_OUTPUT
else
echo "Branch ${base} does not exist for release ${VERSION} on remote, aborting release"
exit 1
fi
env:
VERSION: ${{ inputs.version }}
publish-pre-release:
needs: check-input-version-param
uses: ./.github/workflows/rw-publish-prerelease.yml
permissions:
contents: write
id-token: write
secrets: inherit
with:
source-branch: ${{ needs.check-input-version-param.outputs.branch }}
author-name: ${{ github.actor }}