Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
chore(ci): use new binary name for the releases
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnwriter committed Nov 21, 2023
1 parent 4a6f0ee commit 2011135
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
14 changes: 14 additions & 0 deletions .github/releaser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# Trigger release action on new release

if [ -z "$1" ]; then
echo "Please provide a version number."
echo "Usages: $0 v[X.Y.Z]"
exit 1
fi

version=$1

git tag "v$version"
git push origin "v$version"
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,27 @@ jobs:
run: |
mkdir release/
cp {LICENSE,README.md} release/
cp target/${{ matrix.config.TARGET }}/release/seren release/
mv release/ seren-${{ env.RELEASE_VERSION }}/
cp target/${{ matrix.config.TARGET }}/release/hysp release/
mv release/ hysp-${{ env.RELEASE_VERSION }}/
- name: Create release artifacts
shell: bash
run: |
if [ "${{ matrix.config.OS }}" = "windows-latest" ]; then
7z a -tzip "seren-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.zip" \
seren-${{ env.RELEASE_VERSION }}
7z a -tzip "hysp-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.zip" \
hysp-${{ env.RELEASE_VERSION }}
else
tar -czvf seren-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.tar.gz \
seren-${{ env.RELEASE_VERSION }}/
shasum -a 512 seren-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.tar.gz \
> seren-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.tar.gz.sha512
tar -czvf hysp-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.tar.gz \
hysp-${{ env.RELEASE_VERSION }}/
shasum -a 512 hysp-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.tar.gz \
> hysp-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.tar.gz.sha512
fi
- name: Upload the release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: seren-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.*
file: hysp-${{ env.RELEASE_VERSION }}-${{ matrix.config.TARGET }}.*
file_glob: true
overwrite: true
tag: ${{ github.ref }}
Expand Down

0 comments on commit 2011135

Please sign in to comment.