diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d07d7f99..97eebb9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1076,3 +1076,37 @@ jobs: env: OUTPUT_FILE: "CHANGELOG.md" EXPECTED_FILE: "test-input-file.md" + + test-multiple-git-path: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + path: "./" + ref: ${{ github.ref == 'github.event.repository.default_branch' && github.head_ref || github.event.pull_request.head.ref }} + fetch-depth: 0 + + - run: npm ci --prod + - run: npm run build + + - name: Generate changelog + id: changelog + uses: ./ + with: + github-token: ${{ secrets.github_token }} + git-branch: ${{ github.ref == github.event.repository.default_branch && github.head_ref || github.event.pull_request.head.ref }} + git-path: | + src/helpers + src/version + .github/workflows + skip-commit: 'true' + skip-tag: 'true' + release-count: 0 + create-summary: 'true' + + - name: Test output + run: | + echo "${{ steps.changelog.outputs.changelog }}" > change_log + sed "s/\(### \)\(.*\)/*\2*/g" change_log > change_log2 + diff change_log change_log2 > /dev/null && echo "The changelog has not been generated." || echo "The changelog has been generated." \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index f20c2995..ba376d58 100644 --- a/dist/index.js +++ b/dist/index.js @@ -34828,7 +34828,7 @@ async function run() { const conventionalConfigFile = core.getInput('config-file-path') const preChangelogGenerationFile = core.getInput('pre-changelog-generation') const gitUrl = core.getInput('git-url') - const gitPath = core.getInput('git-path') + const gitPath = core.getMultilineInput('git-path') const infile = core.getInput('input-file') const skipCi = core.getBooleanInput('skip-ci') const createSummary = core.getBooleanInput('create-summary') diff --git a/package-lock.json b/package-lock.json index 2e01e443..73167dab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "conventional-changelog-action", - "version": "5.1.0", + "version": "5.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "conventional-changelog-action", - "version": "5.1.0", + "version": "5.2.1", "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", diff --git a/src/index.js b/src/index.js index 722392b8..7e8bd836 100644 --- a/src/index.js +++ b/src/index.js @@ -48,7 +48,7 @@ async function run() { const conventionalConfigFile = core.getInput('config-file-path') const preChangelogGenerationFile = core.getInput('pre-changelog-generation') const gitUrl = core.getInput('git-url') - const gitPath = core.getInput('git-path') + const gitPath = core.getMultilineInput('git-path') const infile = core.getInput('input-file') const skipCi = core.getBooleanInput('skip-ci') const createSummary = core.getBooleanInput('create-summary')