This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
testing new version checker #9
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: Create Release Candidate | |
on: | |
push: | |
branches: | |
- "release/*" | |
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 }}" |