From 8044ea441ae9433d7ac82befecefb9a55439f9a6 Mon Sep 17 00:00:00 2001
From: Mike Penz
Date: Sat, 17 Oct 2020 19:56:31 +0200
Subject: [PATCH 1/5] - introduce `other` category for library changelog
---
.github/workflows/ci.yml | 1 +
configs/configuration_repo.json | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
create mode 100644 configs/configuration_repo.json
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3f84449..6f6be4f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -66,6 +66,7 @@ jobs:
id: github_release
uses: mikepenz/release-changelog-builder-action@main
with:
+ configuration: "configs/configuration_repo.json"
toTag: ${{ steps.tag_version.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/configs/configuration_repo.json b/configs/configuration_repo.json
new file mode 100644
index 0000000..f85ca02
--- /dev/null
+++ b/configs/configuration_repo.json
@@ -0,0 +1,20 @@
+{
+ "categories": [
+ {
+ "title": "## ๐ Features",
+ "labels": ["feature"]
+ },
+ {
+ "title": "## ๐ Fixes",
+ "labels": ["fix"]
+ },
+ {
+ "title": "## ๐งช Tests",
+ "labels": ["test"]
+ },
+ {
+ "title": "## ๐ฌ Other",
+ "labels": ["other"]
+ }
+ ]
+}
\ No newline at end of file
From 9a9cd269402e105cb4d6472109f01d4d49a95e19 Mon Sep 17 00:00:00 2001
From: Mike Penz
Date: Sat, 17 Oct 2020 20:04:44 +0200
Subject: [PATCH 2/5] - improve build to add sample, without having a prior
checkout
---
.github/workflows/ci.yml | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6f6be4f..b0564f6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,6 +22,13 @@ jobs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
+ - name: "Configuration without Checkout"
+ uses: mikepenz/release-changelog-builder-action@main
+ with:
+ toTag: "v0.0.3"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Checkout full depth so tags can be discovered automatically if not specified
@@ -53,10 +60,6 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0 # Checkout full depth so tags can be discovered automatically if not specified
-
- name: Prepare Tag
if: startsWith(github.ref, 'refs/tags/')
id: tag_version
From bfabe29961086e383c17254f50a0cd7a93251a62 Mon Sep 17 00:00:00 2001
From: Mike Penz
Date: Sat, 17 Oct 2020 20:08:53 +0200
Subject: [PATCH 3/5] - use develop state for action
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b0564f6..a5d49d0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Configuration without Checkout"
- uses: mikepenz/release-changelog-builder-action@main
+ uses: mikepenz/release-changelog-builder-action@develop
with:
toTag: "v0.0.3"
env:
From d970a0bc9a36ba9216ab8c76181adbfa707515e9 Mon Sep 17 00:00:00 2001
From: Mike Penz
Date: Sat, 17 Oct 2020 20:13:31 +0200
Subject: [PATCH 4/5] - improve messages for test output - include complete
sample in README
---
.github/workflows/ci.yml | 9 +++++++--
README.md | 42 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a5d49d0..3f5f5f0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,13 +22,18 @@ jobs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
+ # Won't support providing a configuration file, as no checkout was done
- name: "Configuration without Checkout"
+ id: without_checkout
uses: mikepenz/release-changelog-builder-action@develop
with:
toTag: "v0.0.3"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Echo Configuration without Checkout Changelog
+ run: echo "${{steps.without_checkout.outputs.changelog}}"
+
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Checkout full depth so tags can be discovered automatically if not specified
@@ -39,7 +44,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Echo Minimal
+ - name: Echo Minimal Configuration Changelog
run: echo "${{steps.minimal_release.outputs.changelog}}"
- name: "Complex Configuration"
@@ -53,7 +58,7 @@ jobs:
toTag: "v0.0.3"
token: ${{ secrets.GITHUB_TOKEN }}
- - name: Echo Complex
+ - name: Echo Complex Configuration Changelog
run: echo "${{steps.complex_release.outputs.changelog}}"
release:
diff --git a/README.md b/README.md
index 92df9de..665ea75 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,7 @@
Setup ๐ ๏ธ •
Customization ๐๏ธ •
Contribute ๐งฌ •
+ Complete Sample ๐ฅ๏ธ •
License ๐
@@ -171,6 +172,47 @@ Table of supported placeholders allowed to be used in the `pr_template` configur
| `${{UNCATEGORIZED}}` | All pull requests not matching a specified label in categories |
+## Complete Sample ๐ฅ๏ธ
+
+Below is a complete example showcasing how to define a build, which is executed when tagging the project. It consists of:
+- Prepare tag, via the GITHUB_REF environment variable
+- Build changelog, given the tag
+- Create release on GitHub - specifying body with constructed changelog
+
+```yml
+name: 'CI'
+on:
+ push:
+ tags:
+ - '*'
+
+ release:
+ if: startsWith(github.ref, 'refs/tags/')
+ runs-on: ubuntu-latest
+ steps:
+ - name: Retrieve tag
+ if: startsWith(github.ref, 'refs/tags/')
+ id: tag_version
+ run: echo ::set-output name=VERSION::$(echo ${GITHUB_REF:10})
+
+ - name: Build Changelog
+ id: github_release
+ uses: mikepenz/release-changelog-builder-action@main
+ with:
+ toTag: ${{ steps.tag_version.outputs.VERSION }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Create Release
+ uses: actions/create-release@v1
+ with:
+ tag_name: ${{ github.ref }}
+ release_name: ${{ github.ref }}
+ body: ${{steps.github_release.outputs.changelog}}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+```
+
## Contribute ๐งฌ
```bash
From fde922d7852a24fd5e24597af6878ee5a2543bc6 Mon Sep 17 00:00:00 2001
From: Mike Penz
Date: Sat, 17 Oct 2020 20:15:05 +0200
Subject: [PATCH 5/5] - fix link
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 665ea75..6e822b9 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@
Setup ๐ ๏ธ •
Customization ๐๏ธ •
Contribute ๐งฌ •
- Complete Sample ๐ฅ๏ธ •
+ Complete Sample ๐ฅ๏ธ •
License ๐