From a0d4a3f2e8ed8102a07882d1df55333a90fddbfb Mon Sep 17 00:00:00 2001 From: zjt003 Date: Sun, 19 Jan 2025 18:34:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0macos=20dmg=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E7=AD=BE=E5=90=8D=20(#6541)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update package-osx.sh * Update build-osx.yml --- .github/workflows/build-osx.yml | 10 +++++++++- package-osx.sh | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-osx.yml b/.github/workflows/build-osx.yml index 6a50d6b4..e2a64147 100644 --- a/.github/workflows/build-osx.yml +++ b/.github/workflows/build-osx.yml @@ -60,6 +60,14 @@ jobs: tag: ${{ github.event.inputs.release_tag }} file_glob: true + - name: Upload sha256 checksum to release + uses: svenstaro/upload-release-action@v2 + if: github.event.inputs.release_tag != '' + with: + file: ${{ github.workspace }}/v2rayN*.sha256 + tag: ${{ github.event.inputs.release_tag }} + file_glob: true + # release zip archive - name: Package release zip archive if: github.event.inputs.release_tag != '' @@ -75,4 +83,4 @@ jobs: file: ${{ github.workspace }}/v2rayN*.zip tag: ${{ github.event.inputs.release_tag }} file_glob: true - prerelease: true \ No newline at end of file + prerelease: true diff --git a/package-osx.sh b/package-osx.sh index 042e29b7..a7543d43 100755 --- a/package-osx.sh +++ b/package-osx.sh @@ -55,4 +55,8 @@ create-dmg \ --hide-extension "v2rayN.app" \ --app-drop-link 500 185 \ "v2rayN-${Arch}.dmg" \ - "$PackagePath/v2rayN.app" \ No newline at end of file + "$PackagePath/v2rayN.app" + +# 为生成的 DMG 文件创建 SHA256 校验值文件 +SHA256File="v2rayN-${Arch}.dmg.sha256" +shasum -a 256 "v2rayN-${Arch}.dmg" > "$SHA256File"