Skip to content

docs: release v1.8.1 #25

docs: release v1.8.1

docs: release v1.8.1 #25

Workflow file for this run

# Creates GitHub releases automatically when version tags (e.g. v1.0.0) are pushed.
# Also, syncs the major version branch (e.g. v1) with the release tag.
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v5
- name: Create Github release
uses: docker://antonyurchenko/git-release:v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sync major version branch with release tag
run: | #shell
# Extract major version from tag (e.g., v1.2.3 -> v1)
TAG_NAME="${{ github.ref_name }}"
MAJOR_VERSION=$(echo "$TAG_NAME" | cut -d. -f1)
MAJOR_BRANCH="$MAJOR_VERSION"
echo "Syncing branch '$MAJOR_BRANCH' with tag '$TAG_NAME'"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin "$MAJOR_BRANCH" || true
git checkout -B "$MAJOR_BRANCH"
git push origin "$MAJOR_BRANCH" --force