Release next RC from '5.2.4' #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Automated Release: Release next RC from release branch" | ||
on: | ||
push: | ||
branches: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
run-name: Release next RC from '${{ github.ref_name }}' | ||
jobs: | ||
get_tag_name: | ||
name: Calculate next RC number | ||
env: | ||
CURRENT_BRANCH: ${{ github.ref_name }} | ||
runs-on: ubuntu-latest | ||
outputs: | ||
next_version: ${{ steps.calculate-next-version.outputs.next_version }} | ||
steps: | ||
- name: Get latest RC tag. | ||
id: latest_rc_tag | ||
uses: oprypin/find-latest-tag@v1 | ||
with: | ||
repository: ${{ github.repository }} | ||
prefix: v${{ env.CURRENT_BRANCH }}rc | ||
- name: Calculate next_version | ||
id: calculate-next-version | ||
run: | | ||
CURRENT_BRANCH="${{ github.ref_name }}" | ||
LATEST_TAG="${{ steps.latest_rc_tag.outputs.tag }}" | ||
LATEST_TAG="${LATEST_TAG#v}" | ||
# Split version by 'rc' and increment the last number | ||
base="${LATEST_TAG%rc*}" | ||
rc_number="${LATEST_TAG##*rc}" | ||
next_rc_number=$((rc_number + 1)) | ||
next_version="${base}rc${next_rc_number}" | ||
echo "next_version=$next_version" >> $GITHUB_OUTPUT | ||
tag_and_release: | ||
Check failure on line 38 in .github/workflows/automated_release.rc_version.yml
|
||
name: Tag and release version ${{ needs.get_tag_name.outputs.next_version }} from branch ${{ github.ref_name }} | ||
uses: ./.github/workflows/tag.yml | ||
needs: get_tag_name | ||
with: | ||
version: ${{ needs.get_tag_name.outputs.next_version }} | ||
from_branch: ${{ github.ref_name }} |