summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release.yml43
1 files changed, 41 insertions, 2 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index faffae5..d6eaa63 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -81,15 +81,54 @@ jobs:
name: windows-dist
path: upload
+ - name: Generate base release note from github api
+ run: |
+ gh api repos/${{ github.repository }}/releases/generate-notes \
+ -f tag_name=${{ github.ref_name }} \
+ -q .body > auto_notes.md
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Format download link
+ run: |
+ {
+ echo "## Downloads"
+ for f in upload/*.{tar.gz,zip}; do
+ [ -e "$f" ] || continue
+ base=$(basename "$f")
+ echo "- [$base](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/$base)"
+ done
+ } >> auto_notes.md
+
+ - name: Format and append buildinfo
+ run: |
+ {
+ echo "## Build Info"
+ shopt -s nullglob
+ files=(upload/*.buildinfo)
+
+ for f in "${files[@]}"; do
+ echo ""
+ echo "### $(basename "$f")"
+ while IFS=: read -r key value; do
+ key=$(echo "$key" | xargs)
+ value=$(echo "$value" | xargs)
+ echo "- **$key**: $value"
+ done < "$f"
+ done
+ } >> auto_notes.md
+
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
- generate_release_notes: true
+ body_path: auto_notes.md
prerelease: ${{ contains(github.ref_name, '-') }}
files: |
upload/*.tar.gz
upload/*.zip
upload/*.sha256
- upload/*.buildinfo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}