Skip to content

Commit

Permalink
qwf
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Mar 5, 2024
1 parent 6539feb commit be4c0c8
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/release-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,20 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Important pour s'assurer que tous les commits sont récupérés
ref: ${{ github.event.pull_request.base.sha }} # Checkout the merge base commit of the PR

- name: Generate changelog
id: generate_changelog
run: |
# Utilisez git pour extraire les messages de commit entre cette branche et master
CHANGELOG=$(git log origin/master.. --oneline --no-merges)
# Formatage pour Markdown (commentaire GitHub)
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=changelog::$CHANGELOG"
npm install -g conventional-changelog-cli
conventional-changelog -p angular -i CHANGELOG.md -s -r 0
cat CHANGELOG.md > changelog.txt
echo "CHANGELOG_CONTENT=$(cat changelog.txt)" >> $GITHUB_ENV
- name: Comment on PR
uses: thollander/actions-comment-pull-request@v1
with:
message: |
## Changelog
${{ steps.generate_changelog.outputs.changelog }}
${{ env.CHANGELOG_CONTENT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit be4c0c8

Please sign in to comment.