Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

trigger on tags too #11

trigger on tags too

trigger on tags too #11

Workflow file for this run

name: Create Release Candidate
on:
push:
branches:
- "release/*"
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Latest Release
id: get_latest_release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
# excludes: rc, alpha, beta # Optional. Exclude keywords like rc, alpha, beta releases.
- name: Bump possible release candidate version
id: bump_version
uses: christian-draeger/[email protected]
with:
current-version: ${{ steps.get_latest_release.outputs.release }}
version-fragment: "rc"
- name: Check out the branch or tag
id: vars
run: |
# echo "version=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
if [[ $GITHUB_REF =~ ^refs/tags/ ]]; then
VERSION=${{ github.ref_name }}
elif [[ $GITHUB_REF =~ ^refs/heads/release/.* ]]; then
VERSION=${{ steps.bump_version.outputs.next-version }}
else
VERSION=0.0.1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: LOG Release Candidate
run: |
echo "RELEASE: ${{ steps.vars.outputs.version }}"