Skip to content

new workflow

new workflow #18

Workflow file for this run

name: Releases
on:
push:
branches:
- release
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --local user.email "mohite770.pm@gmail.com
git config --local user.name "Pratikkumar Mohite"
- name: Create and push Git tag
run: |
# Fetch the latest tags
git fetch --tags
# Get the latest tag version
latest_tag=$(git describe --tags --abbrev=0)
# Parse the version components (assuming semantic versioning)
IFS='.' read -r major minor patch <<< "$latest_tag"
# Increment the patch version
new_patch=$((patch + 1))
# Create a new tag
new_tag="${major}.${minor}.${new_patch}"
git tag "${new_tag}"
# Push the new tag to the repository
git push origin "${new_tag}"
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}