Skip to content

Commit

Permalink
Merge pull request #835 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz authored Jul 29, 2022
2 parents 296d83f + f0d418b commit f7134ad
Show file tree
Hide file tree
Showing 14 changed files with 315 additions and 300 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
- '**.md'
workflow_dispatch:

concurrency:
group: ${{ github.event.pull_request.number }}-check
cancel-in-progress: true

jobs:
check-dist:
runs-on: ubuntu-latest
Expand Down
34 changes: 32 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- '*'
pull_request:

concurrency:
group: ${{ github.event.pull_request.number }}-ci
cancel-in-progress: true

jobs:
build:
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -34,12 +38,38 @@ jobs:
steps:
# the below actions use the local state of the action. please replace `./` with `mikepenz/release-changelog-builder-action@{latest-release}`
# Showcases how to use the action without a prior checkout
# Won't support providing a configuration file, as no checkout was done
# Since 3.2.0 the configuration can be provided within the `yml` file
- name: "Configuration without Checkout"
id: without_checkout
uses: mikepenz/release-changelog-builder-action@develop
with:
toTag: "v0.0.3"
toTag: "v3.1.1"
configurationJson: |
{
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>",
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feature"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix"]
},
{
"title": "## 🧪 Tests",
"labels": ["test"]
},
{
"title": "## 💬 Other",
"labels": ["other"]
},
{
"title": "## 📦 Dependencies",
"labels": ["dependencies"]
}
]
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
schedule:
- cron: '41 22 * * 4'

concurrency:
group: ${{ github.event.pull_request.number }}-codeql
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand Down
48 changes: 44 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ Below is a complete example showcasing how to define a build, which is executed

> Note: PRs will only show up in the changelog if assigned one of the default label categories "feature", "fix" or "test"

<details><summary><b>Example</b></summary>
<p>

```yml
name: 'CI'
on:
Expand All @@ -122,11 +125,47 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v0.1.14
uses: mikepenz/action-gh-release@v0.2.0-a02 #softprops/action-gh-release
with:
body: ${{steps.github_release.outputs.changelog}}
```

</p>
</details>

<details><summary><b>Example w/ Configuration</b></summary>
<p>

```yml
jobs:
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Build Changelog
uses: mikepenz/release-changelog-builder-action@v3
with:
configurationJson: |
{
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>",
"categories": [
{
"title": "## 💬 Other",
"labels": ["other"]
},
{
"title": "## 📦 Dependencies",
"labels": ["dependencies"]
}
]
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

</p>
</details>

## Customization 🖍️

### Note
Expand All @@ -152,7 +191,7 @@ The action supports flexible configuration options to modify vast areas of its b
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

> **Warning** It is required to have a `checkout` step prior to the changelog step, to allow the action to discover the configuration file.
> **Warning** It is required to have a `checkout` step prior to the changelog step if `configuration` is used, to allow the action to discover the configuration file. Use `configurationJson` as alternative.

This configuration is a `.json` file in the following format.

Expand Down Expand Up @@ -262,6 +301,7 @@ For advanced use cases additional settings can be provided to the action

| **Input** | **Description** |
|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `configurationJson` | Provide the configuration directly via the build `yml` file. Please note that `${{}}` has to be written as `#{{}}` within the `yml` file. |
| `configuration` | Relative path, to the `configuration.json` file, providing additional configurations |
| `outputFile` | Optional relative path to a file to store the resulting changelog in. |
| `owner` | The owner of the repository to generate the changelog for |
Expand Down Expand Up @@ -299,7 +339,6 @@ Table of supported placeholders allowed to be used in the `pr_template` configur
| `${{ASSIGNEES}}` | Login names of assigned GitHub users, joined by `,` |
| `${{REVIEWERS}}` | GitHub Login names of specified reviewers, joined by `,`. Requires `fetchReviewers` to be enabled. |
| `${{APPROVERS}}` | GitHub Login names of users who approved the PR, joined by `,` |
| `${{DAYS_SINCE}}` | Days between the 2 releases. Requires `fetchReleaseInformation` to be enabled. |

### Template placeholders

Expand All @@ -325,8 +364,9 @@ Table of supported placeholders allowed to be used in the `template` and `empty_
| `${{COMMITS}}` | The count of commits in this release. | |
| `${{CATEGORIZED_COUNT}}` | The count of PRs which were categorized | |
| `${{UNCATEGORIZED_COUNT}}` | The count of PRs and changes which were not categorized. No label overlapping with category labels | |
| `${{OPEN_COUNT}}` | The count of open PRs. Will only be fetched if `includeOpen` is configured. | |
| `${{OPEN_COUNT}}` | The count of open PRs. Will only be fetched if `includeOpen` is configured. | |
| `${{IGNORED_COUNT}}` | The count of PRs and changes which were specifically ignored from the changelog. | |
| `${{DAYS_SINCE}}` | Days between the 2 releases. Requires `fetchReleaseInformation` to be enabled. | * |

### Configuration Specification

Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ branding:
icon: 'award'
color: 'green'
inputs:
configurationJson:
description: 'Defines the configuration json. If provided, will be prefered over `configuration`.'
configuration:
description: 'Defines the relative path to the configuration file.'
path:
Expand Down
Loading

0 comments on commit f7134ad

Please sign in to comment.