mirror of
https://github.com/dragonish/obsidian-heading-decorator.git
synced 2026-07-22 05:42:05 +00:00
ci(release): print contributors in content
This commit is contained in:
parent
5646263908
commit
d31e2879cd
1 changed files with 18 additions and 1 deletions
19
.github/workflows/release.yaml
vendored
19
.github/workflows/release.yaml
vendored
|
|
@ -38,6 +38,18 @@ jobs:
|
|||
run: |
|
||||
current=$(git describe --abbrev=0 --tags)
|
||||
echo "current=${current}" >> ${GITHUB_OUTPUT}
|
||||
- name: Get contributors
|
||||
id: contributors
|
||||
run: |
|
||||
previous_tag=$(git describe --abbrev=0 --tags HEAD^ 2>/dev/null || echo "")
|
||||
if [ -z "$previous_tag" ]; then
|
||||
contributors=$(git log --format='%an' HEAD | sort | uniq -c | sort -rn | head -10 | awk '{print "- @" $2}')
|
||||
else
|
||||
contributors=$(git log ${previous_tag}..HEAD --format='%an' | sort | uniq -c | sort -rn | head -10 | awk '{print "- @" $2}')
|
||||
fi
|
||||
echo "contributors<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "$contributors" >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
|
|
@ -46,4 +58,9 @@ jobs:
|
|||
prerelease: false
|
||||
draft: false
|
||||
artifacts: "main.js,styles.css,manifest.json"
|
||||
body: ${{ steps.changelog_text.outputs.changes }}
|
||||
body: |
|
||||
${{ steps.changelog_text.outputs.changes }}
|
||||
|
||||
## Contributors
|
||||
|
||||
${{ steps.contributors.outputs.contributors }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue