diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d9ab7154..4be6c117 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: @@ -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 @@ -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