- improve messages for test output
- include complete sample in README
This commit is contained in:
@@ -22,13 +22,18 @@ jobs:
|
|||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
# Won't support providing a configuration file, as no checkout was done
|
||||||
- name: "Configuration without Checkout"
|
- name: "Configuration without Checkout"
|
||||||
|
id: without_checkout
|
||||||
uses: mikepenz/release-changelog-builder-action@develop
|
uses: mikepenz/release-changelog-builder-action@develop
|
||||||
with:
|
with:
|
||||||
toTag: "v0.0.3"
|
toTag: "v0.0.3"
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Echo Configuration without Checkout Changelog
|
||||||
|
run: echo "${{steps.without_checkout.outputs.changelog}}"
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Checkout full depth so tags can be discovered automatically if not specified
|
fetch-depth: 0 # Checkout full depth so tags can be discovered automatically if not specified
|
||||||
@@ -39,7 +44,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Echo Minimal
|
- name: Echo Minimal Configuration Changelog
|
||||||
run: echo "${{steps.minimal_release.outputs.changelog}}"
|
run: echo "${{steps.minimal_release.outputs.changelog}}"
|
||||||
|
|
||||||
- name: "Complex Configuration"
|
- name: "Complex Configuration"
|
||||||
@@ -53,7 +58,7 @@ jobs:
|
|||||||
toTag: "v0.0.3"
|
toTag: "v0.0.3"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Echo Complex
|
- name: Echo Complex Configuration Changelog
|
||||||
run: echo "${{steps.complex_release.outputs.changelog}}"
|
run: echo "${{steps.complex_release.outputs.changelog}}"
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<a href="#setup">Setup 🛠️</a> •
|
<a href="#setup">Setup 🛠️</a> •
|
||||||
<a href="#customization-%EF%B8%8F">Customization 🖍️</a> •
|
<a href="#customization-%EF%B8%8F">Customization 🖍️</a> •
|
||||||
<a href="#contribute-">Contribute 🧬</a> •
|
<a href="#contribute-">Contribute 🧬</a> •
|
||||||
|
<a href="#complete-sample-">Complete Sample 🖥️</a> •
|
||||||
<a href="#license">License 📓</a>
|
<a href="#license">License 📓</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -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 |
|
| `${{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 🧬
|
## Contribute 🧬
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user