-
Notifications
You must be signed in to change notification settings - Fork 119
41 lines (40 loc) · 1.47 KB
/
prerelease-beta-patch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# (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 }}