Files
auto-changelog-release-action/action.yml
Max P. e5f5084931 feat(action): integrate gha-timer for step timing
- Adds gha-timer to measure and log execution time for steps
- Improves visibility into step outcomes with success/failure logging
- Enhances debugging and performance analysis capability
2025-06-29 13:49:17 +02:00

74 lines
2.1 KiB
YAML

name: Auto Changelog & Release
description: "One-stop composite action for version-bump detection, changelog generation and Gitea release."
inputs:
token:
description: "Gitea/GitHub PAT für Release-API"
required: false
default: ""
author_name:
description: "Commit-Autorname"
required: false
default: ""
author_email:
description: "Commit-Autore-Mail"
required: false
default: ""
runs:
using: "composite"
steps:
- uses: fulcrumgenomics/gha-timer@v1
- name: Detect version change
shell: bash
id: detect
env:
GITHUB_EVENT_BEFORE: ${{ github.event.before || '' }}
GITHUB_SHA: ${{ github.sha || '' }}
GITHUB_REF: ${{ github.ref || '' }}
run: |
gha-timer start --name "Detect Version Change"
${{ github.action_path }}/scripts/detect-version-change.sh
exit_code=$?
if [[ $exit_code -eq 0 ]]; then
gha-timer elapsed --outcome success --name "Detect Version Change"
else
gha-timer elapsed --outcome failure --name "Detect Version Change"
exit $exit_code
fi
- name: Read CLIFF_VERSION
shell: bash
id: cliff_version
run: |
${{ github.action_path }}/scripts/read-cliff-version.sh
- name: Install git-cliff
shell: bash
run: |
${{ github.action_path }}/scripts/install-git-cliff.sh "${{ steps.cliff_version.outputs.version }}"
- name: Set up git
shell: bash
run: |
${{ github.action_path }}/scripts/setup-git.sh \
"${{ inputs.author_name }}" \
"${{ inputs.author_email }}"
- name: Generate and commit changelog (unreleased)
if: steps.detect.outputs.version_changed == 'false' || github.ref != 'refs/heads/main'
shell: bash
run: |
${{ github.action_path }}/scripts/generate-unreleased-changelog.sh
- name: Release from VERSION
if: steps.detect.outputs.version_changed == 'true' && github.ref == 'refs/heads/main'
shell: bash
env:
RELEASE_PUBLISH_TOKEN: ${{ inputs.token || '' }}
run: |
${{ github.action_path }}/scripts/release-from-version.sh