From 2011135a4a3a089aef56862fd4334787c3ba3dac Mon Sep 17 00:00:00 2001 From: pwnwriter Date: Tue, 21 Nov 2023 21:41:53 +0545 Subject: [PATCH] chore(ci): use new binary name for the releases --- .github/releaser.sh | 14 ++++++++++++++ .github/workflows/release.yml | 18 +++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) create mode 100755 .github/releaser.sh diff --git a/.github/releaser.sh b/.github/releaser.sh new file mode 100755 index 0000000..5969db8 --- /dev/null +++ b/.github/releaser.sh @@ -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" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f47786..8b65948 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}