Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 11 additions & 9 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches:
- main
- develop
- test

jobs:
versioning-and-release:
Expand Down Expand Up @@ -74,12 +75,15 @@ jobs:
- name: Extract changelog from PR description
id: extract_changelog
run: |
# CrΓ©er un fichier temporaire pour traiter le PR body
echo '${{ github.event.pull_request.body }}' > /tmp/pr_body.txt

sed -i 's/\r$//' /tmp/pr_body.txt
{
echo 'PR_BODY_RAW<<EOFRAW'
echo '${{ github.event.pull_request.body }}'
echo 'EOFRAW'
} >> $GITHUB_ENV

PR_BODY=$(cat /tmp/pr_body.txt)
- name: Process changelog
run: |
PR_BODY=$(echo "$PR_BODY_RAW" | tr -d '\r')

if echo "$PR_BODY" | grep -q "#changelog"; then
CHANGELOG=$(echo "$PR_BODY" | sed -n '/#changelog/,$p' | sed '1d' | sed '/^[[:space:]]*$/d')
Expand All @@ -94,12 +98,10 @@ jobs:
CHANGELOG=$(echo "$CHANGELOG" | tr -d '\r' | sed 's/[[:space:]]*$//')

{
echo 'CHANGELOG<<EOF'
echo 'CHANGELOG<<EOFCHANGELOG'
echo "$CHANGELOG"
echo 'EOF'
echo 'EOFCHANGELOG'
} >> $GITHUB_ENV

rm -f /tmp/pr_body.txt

- name: Update version in pyproject.toml
id: version
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# PYTHON
__pycache__/

# Info file
# Info file
tracknatrainapi.egg-info/
Loading