chore: Update package versions #10
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: Release Candidate | |
on: | |
pull_request: | |
types: [ closed ] | |
branches: | |
- develop | |
jobs: | |
release_on_merge: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Determine RC version | |
id: rc_version | |
run: | | |
# Get the latest version tag | |
LATEST_TAG=$(git describe --tags --abbrev=0 --match "[0-9]*.[0-9]*.[0-9]*" 2>/dev/null || echo "0.0.0") | |
# Extract version components | |
IFS='.' read -r -a version_parts <<< "$LATEST_TAG" | |
MAJOR="${version_parts[0]}" | |
MINOR="${version_parts[1]}" | |
PATCH="${version_parts[2]}" | |
# Increment patch version | |
NEW_PATCH=$((PATCH + 1)) | |
NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH" | |
echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_OUTPUT | |
- id: release | |
uses: rymndhng/release-on-push-action@master | |
with: | |
bump_version_scheme: patch | |
tag_prefix: "rc-" | |
release_name: "Release Candidate ${{ steps.rc_version.outputs.NEW_VERSION }}" | |
release_body: | | |
This is a release candidate for version ${{ steps.rc_version.outputs.NEW_VERSION }}. | |
Changes in this release candidate: | |
${{ github.event.pull_request.title }} | |
For full changes, please see the pull request: ${{ github.event.pull_request.html_url }} | |
outputs: | |
version: ${{ steps.release.outputs.version }} |