diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 857c702..43c95ec 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -6,6 +6,7 @@ on: branches: - main - develop + - test jobs: versioning-and-release: @@ -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<> $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') @@ -94,12 +98,10 @@ jobs: CHANGELOG=$(echo "$CHANGELOG" | tr -d '\r' | sed 's/[[:space:]]*$//') { - echo 'CHANGELOG<> $GITHUB_ENV - - rm -f /tmp/pr_body.txt - name: Update version in pyproject.toml id: version diff --git a/.gitignore b/.gitignore index 6ab0bb7..56438cb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,5 @@ # PYTHON __pycache__/ -# Info file +# Info file tracknatrainapi.egg-info/ \ No newline at end of file