Skip to content

Commit 83c0544

Browse files
authored
fix(sha256): failed to gen sha256 (#2)
Signed-off-by: Kevin Cui <[email protected]>
1 parent b4b41a4 commit 83c0544

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/release.yml

-5
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ jobs:
4646
CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848

49-
- name: Hash
50-
run: sha256sums ./out/* > sha256.txt
51-
5249
- name: Get Tag Name
5350
shell: bash
5451
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
@@ -66,9 +63,7 @@ jobs:
6663
uses: softprops/action-gh-release@v2
6764
with:
6865
files: |
69-
./*.tar.gz
7066
./out/*
71-
./sha256.txt
7267
body_path: ./sha256.txt
7368
draft: false
7469
prerelease: false

main.sh

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#/bin/sh
22

3-
set -e
3+
set -ex
44

55
export WORK=`pwd`
66

7+
if [ -z "$CODESIGN_IDENTITY" ]; then
8+
export CODESIGN_IDENTITY="-"
9+
fi
10+
711
rm -rf ./out
812
mkdir -p ./out
913
export GOARCH=arm64
@@ -44,4 +48,12 @@ codesign --force --sign $CODESIGN_IDENTITY --timestamp --entitlements krunkit.en
4448
find $WORK/out -name "*.dylib" -type f -exec sh -c "echo 'Signing {}...'; codesign --force --sign $CODESIGN_IDENTITY --timestamp {}" ';'
4549

4650
# pack
47-
tar -czvf ./libexec-$GOOS-$GOARCH.tar.gz -C ./out/ .
51+
echo "Packing..."
52+
cd $WORK/out
53+
tar -czvf ./libexec-$GOOS-$GOARCH.tar.gz .
54+
55+
# generate sha256
56+
cd $WORK/out
57+
echo "Generating sha256..."
58+
shasum -a 256 ./* > sha256.txt
59+
cat ./sha256.txt

0 commit comments

Comments
 (0)