mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-17 09:59:51 +00:00
Merge pull request #779 from fudiwei/main
build: keep release files as before
This commit is contained in:
commit
a048eb95a9
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
@ -57,8 +57,8 @@ jobs:
|
||||
GOOS: linux
|
||||
run: |
|
||||
mkdir -p dist/linux
|
||||
for ARCH in amd64 arm64 arm; do
|
||||
if [ "$ARCH" = "arm" ]; then
|
||||
for ARCH in amd64 arm64 armv7; do
|
||||
if [ "$ARCH" = "armv7" ]; then
|
||||
export GOARM=7
|
||||
fi
|
||||
go build -ldflags="-s -w -X github.com/usual2970/certimate.Version=${GITHUB_REF#refs/tags/}" -o dist/linux/certimate_${GITHUB_REF#refs/tags/}_linux_$ARCH
|
||||
@ -172,10 +172,22 @@ jobs:
|
||||
cd dist
|
||||
for bin in certimate_*; do
|
||||
if [[ "$bin" == *".exe" ]]; then
|
||||
zip "${bin%.exe}.zip" "${bin}"
|
||||
entrypoint="certimate.exe"
|
||||
else
|
||||
zip -X "${bin}.zip" "${bin}"
|
||||
entrypoint="certimate"
|
||||
fi
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
cp "$bin" "${tmpdir}/${entrypoint}"
|
||||
cp ../README.md ../LICENSE.md ../CHANGELOG.md "$tmpdir"
|
||||
|
||||
if [[ "$bin" == *".exe" ]]; then
|
||||
zip -j "${bin%.exe}.zip" "$tmpdir"/*
|
||||
else
|
||||
zip -j -X "${bin}.zip" "$tmpdir"/*
|
||||
fi
|
||||
|
||||
rm -rf "$tmpdir"
|
||||
done
|
||||
|
||||
# 创建校验和文件
|
||||
@ -190,4 +202,3 @@ jobs:
|
||||
draft: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user