Skip to content

Commit

Permalink
fix(sha256): failed to gen sha256 (#2)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Cui <[email protected]>
  • Loading branch information
BlackHole1 authored Oct 15, 2024
1 parent b4b41a4 commit 83c0544
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ jobs:
CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Hash
run: sha256sums ./out/* > sha256.txt

- name: Get Tag Name
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
Expand All @@ -66,9 +63,7 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: |
./*.tar.gz
./out/*
./sha256.txt
body_path: ./sha256.txt
draft: false
prerelease: false
Expand Down
16 changes: 14 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#/bin/sh

set -e
set -ex

export WORK=`pwd`

if [ -z "$CODESIGN_IDENTITY" ]; then
export CODESIGN_IDENTITY="-"
fi

rm -rf ./out
mkdir -p ./out
export GOARCH=arm64
Expand Down Expand Up @@ -44,4 +48,12 @@ codesign --force --sign $CODESIGN_IDENTITY --timestamp --entitlements krunkit.en
find $WORK/out -name "*.dylib" -type f -exec sh -c "echo 'Signing {}...'; codesign --force --sign $CODESIGN_IDENTITY --timestamp {}" ';'

# pack
tar -czvf ./libexec-$GOOS-$GOARCH.tar.gz -C ./out/ .
echo "Packing..."
cd $WORK/out
tar -czvf ./libexec-$GOOS-$GOARCH.tar.gz .

# generate sha256
cd $WORK/out
echo "Generating sha256..."
shasum -a 256 ./* > sha256.txt
cat ./sha256.txt

0 comments on commit 83c0544

Please sign in to comment.