Skip to content

Commit

Permalink
Merge pull request #130 from jannis-baum/issue/129-fix-automatic-rele…
Browse files Browse the repository at this point in the history
…ase-notes

Fix automatic release notes
  • Loading branch information
jannis-baum authored Jul 26, 2024
2 parents 0e0c4da + 35ff416 commit a658a54
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,7 @@ jobs:
needs: [build-linux, build-macos]
runs-on: ubuntu-latest
steps:
# we check out the repo to get information from tags
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
# release binaries -------------------------------------------------------
- name: download linux artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -84,13 +79,25 @@ jobs:
chmod +x ./vivify-linux/* ./vivify-macos/*
tar -czf vivify-linux.tar.gz vivify-linux
tar -czf vivify-macos.tar.gz vivify-macos
# release notes ----------------------------------------------------------
# we check out the repo to get information from tags
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
# actions/checkout seems to have a bug where annotated tags are converted
# to simple tags so we have to fetch them explicitly again
# https://github.com/actions/checkout/issues/882
- run: git fetch --tags --force origin
- name: build release notes
run: |
echo -e "## What's changed\n" \
> release.md
git tag -l --format="%(contents)" ${{ github.ref_name }} | sed '/^-----BEGIN PGP SIGNATURE-----/,$d' \
>> release.md
echo -e "\n**Full changelog**: https://github.com/jannis-baum/vivify/compare/$(git tag --sort=version:refname | tail -2 | head -1)...${{ github.ref }}" \
echo -e "\n**Full changelog**: https://github.com/jannis-baum/vivify/compare/$(git tag --sort=version:refname | tail -2 | head -1)...${{ github.ref_name }}" \
>> release.md
echo -e '\n**SHA256 checksums**\\' \
>> release.md
Expand All @@ -100,6 +107,8 @@ jobs:
>> release.md
- name: print release notes for logs
run: cat release.md

# release ----------------------------------------------------------------
- name: release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
Expand Down

0 comments on commit a658a54

Please sign in to comment.