---
# $schema: "https://json.schemastore.org/github-workflow.json"
name: Debug Changelog # Workflow name displayed on GitHub

on:
  workflow_dispatch: # Trigger manually

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions: read-all

jobs:
  debug-changelog:
    runs-on: self-hosted

    permissions: write-all

    steps:
      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

      - name: Create changelog text
        id: changelog
        uses: loopwerk/tag-changelog@941366edb8920e2071eae0449031830984b9f26e # v1.3.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          config_file: .github/tag-changelog-config.js

      - name: 'Echo results'
        id: output-changelog
        run: |
          echo "${{ steps.changelog.outputs.changes }}"
