Skip to content

Commit

Permalink
Merge pull request #108 from jannis-baum/issue/107-misc-release-adjus…
Browse files Browse the repository at this point in the history
…tments

Misc release adjustments
  • Loading branch information
jannis-baum authored Jul 18, 2024
2 parents ee962a5 + edc06fd commit 264e71d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion release.sh → .github/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then
echo "Releases should only be made from branch main"
Expand Down
33 changes: 26 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,46 @@ 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
- name: download linux artifact
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/download-artifact@v4
with:
name: vivify-linux
path: ./vivify-linux
- name: download macos artifact
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/download-artifact@v4
with:
name: vivify-macos
path: ./vivify-macos
- name: fix permissions & archive
if: startsWith(github.ref, 'refs/tags/v')
run: |
chmod +x ./vivify-linux/* ./vivify-macos/*
zip -r vivify-linux.zip vivify-linux
zip -r vivify-macos.zip vivify-macos
tar -czf vivify-linux.tar.gz vivify-linux
tar -czf vivify-macos.tar.gz vivify-macos
- name: build release notes
run: |
echo -e "## What's changed\n" \
> release.md
git tag -l --format="%(contents:subject)" ${{ github.ref }} \
>> 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 }}" \
>> release.md
echo -e '\n**SHA256 checksums**\\' \
>> release.md
echo -e "Linux: \`$(sha256sum vivify-linux.tar.gz | cut -d' ' -f1)\`\\" \
>> release.md
echo -e "macOS: \`$(sha256sum vivify-macos.tar.gz | cut -d' ' -f1)\`" \
>> release.md
- name: print release notes for logs
run: cat release.md
- name: release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: vivify-*.zip
body_path: release.md
files: vivify-*.tar.gz

0 comments on commit 264e71d

Please sign in to comment.