Skip to content

Commit

Permalink
Merge pull request #44 from wakatime/bugfix/changelog
Browse files Browse the repository at this point in the history
Fix changelog when content is too long
  • Loading branch information
alanhamlett authored Mar 28, 2023
2 parents 4f3d71f + 56662bc commit 776336a
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,31 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
-
# Run only for main branch
if: ${{ github.ref == 'refs/heads/main' }}
name: Changelog for main
uses: gandarez/[email protected]
id: changelog-main
with:
current_tag: ${{ github.sha }}
previous_tag: ${{ needs.version.outputs.ancestor_tag }}
exclude: |
^Merge pull request .*
-
# Run only for release branch
if: ${{ github.ref == 'refs/heads/release' }}
name: Get related pull request
uses: 8BitJonny/[email protected]
id: changelog-release
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
-
name: Prepare changelog
id: changelog
run: |
echo "${{ steps.changelog-main.outputs.changelog || steps.changelog-release.outputs.pr_body }}" > changelog.txt
./bin/prepare_changelog.sh $(echo ${GITHUB_REF#refs/heads/}) "$(cat changelog.txt)"
-
name: Download artifacts
uses: actions/download-artifact@v3
Expand All @@ -174,6 +199,7 @@ jobs:
with:
name: ${{ needs.version.outputs.semver_tag }}
tag_name: ${{ needs.version.outputs.semver_tag }}
body: "## Changelog\n${{ steps.changelog.outputs.changelog }}"
prerelease: ${{ needs.version.outputs.is_prerelease }}
target_commitish: ${{ github.sha }}
draft: false
Expand All @@ -192,4 +218,3 @@ jobs:
repo: context.repo.repo,
ref: "tags/${{ needs.version.outputs.semver_tag }}"
})

0 comments on commit 776336a

Please sign in to comment.