Skip to content

bump honox

bump honox #2

Workflow file for this run

name: Sync versioned branch
on:
push:
branches:
- main
permissions:
contents: write
jobs:
sync_branch:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Get create-hono version
id: get_version
run: |
VERSION=$(npm show create-hono version)
MAJOR_MINOR=$(echo "$VERSION" | cut -d '.' -f 1,2)
echo "Detected version: $VERSION"
echo "Branch name: v$MAJOR_MINOR"
echo "branch_name=v$MAJOR_MINOR" >> "$GITHUB_ENV"
- name: Setup Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Sync branch
run: |
git fetch origin
git switch ${{ env.branch_name }} || git switch -c ${{ env.branch_name }}
git reset --hard origin/main
git push origin ${{ env.branch_name }} --force