mirror of
https://github.com/bretzel-app/crumbs.git
synced 2026-10-12 20:06:57 +02:00
Add scripts/release.sh that infers bump type from conventional commits (major/minor/patch), bumps package.json, commits, tags, and pushes. Includes safety checks for branch, clean tree, and remote sync. Also adds a workflow_dispatch GitHub Actions workflow (bump.yml) and Makefile targets (release, release-patch, release-minor, release-major). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
38 lines
840 B
YAML
38 lines
840 B
YAML
name: Bump & Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
bump:
|
|
description: 'Override bump type (leave empty to auto-detect)'
|
|
required: false
|
|
type: choice
|
|
options:
|
|
- ''
|
|
- patch
|
|
- minor
|
|
- major
|
|
|
|
jobs:
|
|
bump:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Run release script
|
|
run: bash scripts/release.sh ${{ github.event.inputs.bump }}
|