mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-14 08:17:37 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
83 lines
3.1 KiB
YAML
83 lines
3.1 KiB
YAML
name: Release - HugoBlox Modules
|
|
run-name: ${{ github.workflow }} - ${{ github.ref_name }}
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry_run:
|
|
description: "Run without committing/tagging"
|
|
type: boolean
|
|
default: true
|
|
propagate:
|
|
description: "Propagate dependency bumps to dependents"
|
|
type: boolean
|
|
default: true
|
|
update_templates_to_commits:
|
|
description: "Update templates to use latest module commits instead of tagged versions"
|
|
type: boolean
|
|
default: false
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: release-modules
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
LOG_LEVEL: INFO
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Install Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: 1.8.3
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
poetry --version
|
|
poetry install --no-interaction --no-ansi
|
|
|
|
- name: Configure Git identity
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
# Skip plan display when updating templates to commits as it's not relevant for that operation
|
|
- name: Show plan (dry run)
|
|
if: ${{ inputs.dry_run && !inputs.update_templates_to_commits }}
|
|
run: |
|
|
poetry run python scripts/release_modules.py --print-plan --log-level $LOG_LEVEL
|
|
|
|
# Dedicated step for updating templates to use latest commits instead of tagged versions
|
|
# Only runs when specifically requested and not in dry run mode
|
|
- name: Update templates to commits
|
|
if: ${{ inputs.update_templates_to_commits && !inputs.dry_run }}
|
|
run: |
|
|
poetry run python scripts/release_modules.py --yes --update-starters-to-commits --log-level $LOG_LEVEL
|
|
|
|
# Standard release process - only runs when not in dry run mode and not updating templates to commits
|
|
# These operations are mutually exclusive - we either do a normal release or update starters to commits
|
|
- name: Release (commit, tag, push)
|
|
if: ${{ !inputs.dry_run && !inputs.update_templates_to_commits }}
|
|
run: |
|
|
if [ "${{ inputs.propagate }}" = "true" ]; then
|
|
poetry run python scripts/release_modules.py --yes --propagate --log-level $LOG_LEVEL
|
|
else
|
|
poetry run python scripts/release_modules.py --yes --no-propagate --log-level $LOG_LEVEL
|
|
fi
|