Skip to content

Commit

Permalink
feat: add sha256 check for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Bambooin committed Jun 24, 2021
1 parent 2abdf1e commit b270d43
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# 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

archive: pacakge
./script/archive.sh

sha256sum: archive
./script/sha256sum.sh

release: sha256sum

clean:
rm -rf ${releasePath}

Expand Down
12 changes: 12 additions & 0 deletions script/sha256sum.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

releasePath=release

pushd ${releasePath}

for zip in *.zip
do
sha256sum ${zip} > ${zip}.sha256.txt
done

popd

0 comments on commit b270d43

Please sign in to comment.