Skip to content

Added repo and codes #1

Added repo and codes

Added repo and codes #1

Workflow file for this run

name: Version Bump
on:
push:
branches:
- master
jobs:
version-bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest tag
id: get_latest_tag
run: echo "LATEST_TAG=$(git describe --tags --abbrev=0 || echo v0.0.0)" >> $GITHUB_OUTPUT
- name: Bump version and push tag
id: bump_version
run: |
# Extract version number and increment patch
version=$(echo ${{ steps.get_latest_tag.outputs.LATEST_TAG }} | sed 's/v//')
IFS='.' read -ra ADDR <<< "$version"
new_patch=$((ADDR[2] + 1))
new_version="${ADDR[0]}.${ADDR[1]}.$new_patch"
echo "NEW_VERSION=v$new_version" >> $GITHUB_OUTPUT
# Configure Git
git config user.name github-actions
git config user.email github-actions@github.com
# Create and push new tag
git tag v$new_version
git push origin v$new_version
outputs:
new_version: ${{ steps.bump_version.outputs.NEW_VERSION }}