Skip to content

Commit

Permalink
Merge pull request #25 from jmspit/development : Autogeneration of ch…
Browse files Browse the repository at this point in the history
…angelog in release body

Autogeneration of changelog in release body
  • Loading branch information
jmspit authored Mar 8, 2021
2 parents 34dcf86 + e7bb263 commit 49e0a3c
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 9 deletions.
57 changes: 55 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@ jobs:
runs-on: ubuntu-latest

steps:

- name: Install git
run: |
sudo apt-get install -y git
git --version
- uses: actions/checkout@v2.2.0
with:
fetch-depth: 0

- name: List git tags
run: |
git --no-pager tag
- name: Dump GitHub context
env:
Expand Down Expand Up @@ -52,6 +64,37 @@ jobs:
echo ::set-output name=prerelease::true
fi
- name: Get previous release tag
id: get_previous_release
run: |
if [ "${{ steps.check-tag.outputs.prerelease }}" == "true" ]; then
export LATEST_RELEASE_TAG=$(git --no-pager tag | grep -P 'v[\d]+.[\d]+.[\d]+$' | tail -n1)
else
export LATEST_RELEASE_TAG=$(git --no-pager tag | grep -P 'v[\d]+.[\d]+.[\d]+$' | tail -n2 | head -n1)
fi
echo "::set-output name=tag_name::$(echo "$LATEST_RELEASE_TAG")"
echo "previous release ${LATEST_RELEASE_TAG}"
- name: Get release changelog
id: get_release_changelog
if: steps.check-tag.outputs.prerelease == 'false'
run: |
export CHANGELOG="$(git --no-pager log ${{ steps.get_previous_release.outputs.tag_name }}..HEAD --first-parent --merges --date=short --pretty=format:' - %h %cd %s')"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=changelog::$(echo "$CHANGELOG")"
- name: Get pre-release changelog
id: get_prerelease_changelog
if: steps.check-tag.outputs.prerelease == 'true'
run: |
export CHANGELOG="$(git --no-pager log ${{ steps.get_previous_release.outputs.tag_name }}..HEAD --date=short --pretty=format:' - %h %cd %s')"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=changelog::$(echo "$CHANGELOG")"
- name: Create release
id: create_release
if: steps.check-tag.outputs.prerelease == 'false'
Expand All @@ -61,7 +104,12 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: Release ${{ github.ref }}
body: |
Release ${{ github.ref }}
Changes since ${{ steps.get_previous_release.outputs.tag_name }}:
${{ steps.get_release_changelog.outputs.changelog }}
draft: false
prerelease: false

Expand All @@ -74,7 +122,12 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: Release ${{ github.ref }}
body: |
Release ${{ github.ref }}
Changes since ${{ steps.get_previous_release.outputs.tag_name }}:
${{ steps.get_prerelease_changelog.outputs.changelog }}
draft: false
prerelease: true

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
https://github.com/jmspit/leanux/actions/workflows/build/badge.svg

# leanux

Leanux is a C++ API to Linux performance and configuration data and includes a few tools utilizing this API.
Expand Down
4 changes: 0 additions & 4 deletions leanux.css
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
h1 {
font-size: 14px;
color: black;
}
6 changes: 3 additions & 3 deletions leanux.doxygen
Original file line number Diff line number Diff line change
Expand Up @@ -1194,15 +1194,15 @@ HTML_EXTRA_FILES =
# Minimum value: 0, maximum value: 359, default value: 220.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_HUE = 260

# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
# in the HTML output. For a value of 0 the output will use grayscales only. A
# value of 255 will produce the most vivid colors.
# Minimum value: 0, maximum value: 255, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_SAT = 80

# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
# luminance component of the colors in the HTML output. Values below 100
Expand All @@ -1213,7 +1213,7 @@ HTML_COLORSTYLE_SAT = 100
# Minimum value: 40, maximum value: 240, default value: 80.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_GAMMA = 80
HTML_COLORSTYLE_GAMMA = 100

# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting this
Expand Down

0 comments on commit 49e0a3c

Please sign in to comment.