Skip to content

v0.0.3

v0.0.3 #6

Workflow file for this run

name: Version Bump
on:
pull_request:
branches: [main]
types: [opened]
jobs:
version-bump:
if: startsWith(github.event.pull_request.title, 'v')
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Extract version from PR title
id: extract-version
run: |
if [[ "${{ github.event.pull_request.title }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "version=${BASH_REMATCH[0]}" >> $GITHUB_OUTPUT
else
echo "❌ No valid version found in PR title"
exit 1
fi
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Bump version
run: |
VERSION=${{ steps.extract-version.outputs.version }}
pnpm version $VERSION --no-git-tag-version
- name: Push changes
run: |
git push https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/koderpark/ani-relayer.git HEAD:develop --follow-tags