diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..4f8c218 --- /dev/null +++ b/action.yml @@ -0,0 +1,52 @@ +name: Auto Debian Package Changelog Generation +description: "One-stop composite action for generating a Debian-compatible changelog using git-cliff" + +inputs: + tag: + description: "Git tag" + required: true + package_name: + description: "Package name" + required: true + author_name: + description: "Package author name" + required: true + author_email: + description: "Package author email" + required: true + output_file: + description: "Output file for the changelog" + required: false + default: "debian/changelog" + cliff_config: + description: "Path to the Git-Cliff configuration file" + required: false + default: "" + +runs: + using: "composite" + steps: + # 1) Install git-cliff (latest, default arch) + - name: Install git-cliff + shell: bash + run: | + bash "${{ github.action_path }}/scripts/install-git-cliff.sh" + + # 2) Generate changelog + - name: Generate Debian changelog + shell: bash + env: + PACKAGE_NAME: ${{ inputs.package_name }} + AUTHOR_NAME: ${{ inputs.author_name }} + AUTHOR_EMAIL: ${{ inputs.author_email }} + run: | + # Select config: user-provided or default within the action + CONFIG_PATH="${{ inputs.cliff_config }}" + if [[ -z "$CONFIG_PATH" ]]; then + CONFIG_PATH="${{ github.action_path }}/configs/cliff.debian.toml" + fi + + bash "${{ github.action_path }}/scripts/generate-changelog.sh" \ + -c "$CONFIG_PATH" \ + -t "${{ inputs.tag }}" \ + -o "${{ inputs.output_file }}"