Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in changelog generation #154

Merged
merged 37 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c2e8c47
Release python
MichaelKora Oct 2, 2023
78e9299
Release python
MichaelKora Oct 2, 2023
2e7fce6
Release python
MichaelKora Oct 2, 2023
6084486
Release python
MichaelKora Oct 2, 2023
778641c
Release python
MichaelKora Oct 2, 2023
e434b3e
Release python
MichaelKora Oct 2, 2023
6305194
Release python
MichaelKora Oct 2, 2023
b3bfcde
Release python
MichaelKora Oct 2, 2023
dc47488
Release python
MichaelKora Oct 2, 2023
7bec267
Release python
MichaelKora Oct 2, 2023
e3765e8
Release python
MichaelKora Oct 2, 2023
621323f
Release python
MichaelKora Oct 2, 2023
cbc0029
Release python
MichaelKora Oct 2, 2023
bad02f6
Release python
MichaelKora Oct 2, 2023
af959b2
Release python
MichaelKora Oct 2, 2023
2149f59
Release python
MichaelKora Oct 2, 2023
af830b3
Release python
MichaelKora Oct 2, 2023
74bd9da
Clean code
MichaelKora Oct 2, 2023
8ca1b6b
Clean code
MichaelKora Oct 2, 2023
982f0e4
Clean code
MichaelKora Oct 2, 2023
dd86e01
Clean code
MichaelKora Oct 4, 2023
98de712
Clean code
MichaelKora Oct 4, 2023
21f4a6c
Clean code
MichaelKora Oct 4, 2023
7d6f16d
Clean code
MichaelKora Oct 4, 2023
600812c
Clean code
MichaelKora Oct 4, 2023
8d71fd7
Clean code
MichaelKora Oct 4, 2023
a19cc9f
Clean code
MichaelKora Oct 4, 2023
863c11d
Check if strign is empty using -z
MichaelKora Oct 4, 2023
0dd9e85
Update actions/changelog-generate/action.yaml
MichaelKora Oct 4, 2023
94dfe25
Update the java gradle release github action
MichaelKora Oct 4, 2023
d1bcec4
Output path and allow file check
MichaelKora Oct 4, 2023
bf4bb6a
Output path and allow file check
MichaelKora Oct 4, 2023
1c1e562
Output path and allow file check
MichaelKora Oct 4, 2023
6c9a091
Output path and allow file check
MichaelKora Oct 4, 2023
b9f00eb
Output path and allow file check
MichaelKora Oct 4, 2023
9e94781
Update actions/changelog-generate/action.yaml
MichaelKora Oct 9, 2023
b64b90b
Set Tag to NEXT TAG 1.37.0
MichaelKora Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/workflows/python-poetry-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@ on:
description: "Scope of the release; See: https://python-poetry.org/docs/cli/#version"
required: true
type: string
ref:
description: "The ref name to checkout the repository."
changelog:
description: "Create changelog for release."
required: false
default: ${{ github.event.repository.default_branch }}
type: string
python-version:
description: "The Python version for setting up Poetry. (Default is 3.10)"
default: true
type: boolean
changelog-config:
description: "Changelog config path."
required: false
default: "3.10"
default: ""
type: string
poetry-version:
description: "The Poetry version to be installed. (Default is 1.5.1)"
required: false
default: "1.5.1"
type: string
changelog:
description: "Create changelog for release."
python-version:
description: "The Python version for setting up Poetry. (Default is 3.10)"
required: false
default: true
type: boolean
changelog-config:
description: "Changelog config path."
default: "3.10"
type: string
ref:
description: "The ref name to checkout the repository."
required: false
default: ""
default: ${{ github.event.repository.default_branch }}
type: string
working-directory:
description: "The working directory of your Python package. (Default is root directory)"
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:

- name: Create changelog
id: build-changelog
uses: bakdata/ci-templates/actions/changelog-generate@1.35.0
uses: bakdata/ci-templates/actions/changelog-generate@feat/changelog-eof
MichaelKora marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ inputs.changelog == true}}
with:
github-token: ${{ secrets.github-token }}
Expand Down
29 changes: 15 additions & 14 deletions actions/changelog-generate/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ inputs:
new-tag:
description: Version after bump
required: true

# optional inputs
changelog-file:
description: Path to the changelog file in the GitHub repository
Expand Down Expand Up @@ -74,16 +73,14 @@ runs:
fi
fi
echo "fromtag=$setfrom">> $GITHUB_OUTPUT
if [ -n "${{ inputs.config }}" ]; then
path="$GITHUB_ACTION_PATH/changelog-config.json)"
# if [ "${{ inputs.config }}" != '']; then
if [ -z "${{ inputs.config }}" ]; then
MichaelKora marked this conversation as resolved.
Show resolved Hide resolved
echo "!!!!!!!!! =====>${{ inputs.config }} <===== input is empty !!!!!!!"
path="$GITHUB_ACTION_PATH/changelog-config.json"
else
echo "!!!!!!! =====>${{ inputs.config }} <===== input NOOOT empty !!!!!!"
path=${{ inputs.config }}
fi
if [ ! -f "$path" ]; then
echo "changelog config file $path doesn't exist"
exit 1
fi
echo "path=$path" >> "$GITHUB_OUTPUT"
disrupted marked this conversation as resolved.
Show resolved Hide resolved
shell: bash

- name: "Create changelog"
Expand Down Expand Up @@ -115,9 +112,11 @@ runs:
id: output-generator
run: |
# Reformat ${{ runner.temp }}/changes.md and add it to the existing changelog
echo 'single-changelog<<EOF' >> $GITHUB_OUTPUT
cat ${{ runner.temp }}/changes.md >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
{
echo 'single-changelog<<EOF'
cat ${{ runner.temp }}/changes.md
echo EOF
} >> $GITHUB_OUTPUT

# Create changelog.md in case of a first Release
if [ -n "${{ inputs.changelog-file }}" ]; then
Expand All @@ -130,8 +129,10 @@ runs:
# Update global changelog and pass it to the ouput
sed -i "2i $(sed ':a;N;$!ba;s/\n/\\n/g' ${{ runner.temp }}/changes.md)" ${{ inputs.changelog-file }}

echo 'merged-changelog<<EOF' >> $GITHUB_OUTPUT
cat ${{ inputs.changelog-file }} >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
{
echo 'merged-changelog<<EOF'
cat ${{ inputs.changelog-file }}
echo EOF
} >> $GITHUB_OUTPUT
fi
shell: bash