diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index 78f677c..94d26ed 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -13,8 +13,8 @@ jobs: fetch-depth: 0 submodules: 'recursive' - - name: Archive rimerc - run: make archive + - name: Build rimerc + run: make release - name: Build changelog id: release_log @@ -30,7 +30,7 @@ jobs: - name: Create release uses: ncipollo/release-action@v1 with: - artifacts: "release/*.zip" + artifacts: "release/*.zip,release/*.sha256.txt" body: | ${{ steps.release_log.outputs.changelog }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index 163420f..ef9ff0b 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ # build script for rimerc releasePath=release -.PHONY: all pacakge archive install clean +.PHONY: all pacakge archive sha256sum release install clean -all: archive +all: release pacakge: ./script/package.sh @@ -11,6 +11,11 @@ pacakge: archive: pacakge ./script/archive.sh +sha256sum: archive + ./script/sha256sum.sh + +release: sha256sum + clean: rm -rf ${releasePath} diff --git a/script/sha256sum.sh b/script/sha256sum.sh new file mode 100755 index 0000000..1b4aa0a --- /dev/null +++ b/script/sha256sum.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +releasePath=release + +pushd ${releasePath} + +for zip in *.zip +do + sha256sum ${zip} > ${zip}.sha256.txt +done + +popd