Skip to content

Commit

Permalink
improve release file content
Browse files Browse the repository at this point in the history
  • Loading branch information
Gardelll committed Sep 18, 2022
1 parent 5296272 commit 529ef40
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,23 @@ jobs:
tags: nomsgpack sqlite mysql
trimpath: true

- name: Prepare package
run: cp -v ./config_example.ini ./build

- name: Create ZIP archive
run: |
cp -v ./config_example.ini ./build || exit 1
pushd build || exit 1
ls -alh
zip -9vr ../yggdrasil.zip .
ls -1 yggdrasil-* | while read LINE; do
PREFIX="${LINE%.*}"
SUFFIX="$(echo "$LINE" | grep -osE '\.\w+' || printf '')"
cp -v "$LINE" "yggdrasil$SUFFIX"
FILE="../$PREFIX.zip"
zip -9v "$FILE" "yggdrasil$SUFFIX" *.ini
DGST="$FILE.dgst"
openssl dgst -md5 "$FILE" | sed 's/([^)]*)//g' >>"$DGST"
openssl dgst -sha1 "$FILE" | sed 's/([^)]*)//g' >>"$DGST"
openssl dgst -sha256 "$FILE" | sed 's/([^)]*)//g' >>"$DGST"
openssl dgst -sha512 "$FILE" | sed 's/([^)]*)//g' >>"$DGST"
done
popd || exit 1
FILE=./yggdrasil.zip
DGST=$FILE.dgst
openssl dgst -md5 $FILE | sed 's/([^)]*)//g' >>$DGST
openssl dgst -sha1 $FILE | sed 's/([^)]*)//g' >>$DGST
openssl dgst -sha256 $FILE | sed 's/([^)]*)//g' >>$DGST
openssl dgst -sha512 $FILE | sed 's/([^)]*)//g' >>$DGST
- name: Upload files to GitHub release
uses: softprops/action-gh-release@v1
Expand All @@ -57,4 +59,4 @@ jobs:
prerelease: true
body: For test only
name: ${{ github.ref_name }} Pre Release
files: yggdrasil.zip*
files: yggdrasil*.zip*

0 comments on commit 529ef40

Please sign in to comment.