mirror of
https://github.com/reconurge/flowsint.git
synced 2026-11-08 14:35:41 -06:00
workflow_dispatch button to bump version (patch/minor/major/custom), update CHANGELOG.md, commit, tag and push to main via standard-version — reusing the existing yarn release / sync-versions.js / .versionrc setup instead of duplicating bump logic in YAML. The tag push then triggers images.yml as-is. Requires a GH_PAT secret: pushes made with the default GITHUB_TOKEN don't trigger other workflows (GitHub anti-loop policy), so a plain checkout token would silently skip the images.yml build. sync-versions.js now also bumps the 4 workspace pyproject.toml files (flowsint-api/core/enrichers/types) — previously only root pyproject.toml and flowsint-app/package.json were kept in sync. standard-version added as an explicit devDependency (was only resolved transitively via yarn.lock before).
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: Release
|
|
|
|
# Bump all package/pyproject versions, update CHANGELOG.md, commit, tag and
|
|
# push to main. The tag push then triggers images.yml (build + push Docker
|
|
# images) exactly like a manual `git push --follow-tags` would.
|
|
#
|
|
# Requires a PAT stored as the GH_PAT secret: pushes made with the default
|
|
# GITHUB_TOKEN don't trigger other workflows (GitHub anti-loop policy), so
|
|
# a plain checkout token here would silently skip the images.yml build.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
bump:
|
|
description: "Version bump type"
|
|
required: true
|
|
type: choice
|
|
options: [patch, minor, major, custom]
|
|
default: patch
|
|
custom_version:
|
|
description: "Custom version (e.g. 2.1.0) - only used when bump=custom"
|
|
required: false
|
|
type: string
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
name: Bump version, tag and push
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GH_PAT }}
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Configure git identity
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Bump version, update changelog, commit and tag
|
|
run: |
|
|
if [ "${{ inputs.bump }}" = "custom" ]; then
|
|
RELEASE_AS="${{ inputs.custom_version }}"
|
|
else
|
|
RELEASE_AS="${{ inputs.bump }}"
|
|
fi
|
|
yarn release -- --release-as "$RELEASE_AS"
|
|
|
|
- name: Push commit and tag
|
|
run: git push origin main --follow-tags
|