From 021a5b2f04d460182f1da26c8d10494deb6b827f Mon Sep 17 00:00:00 2001 From: yaobiao131 <28655758+yaobiao131@users.noreply.github.com> Date: Thu, 8 May 2025 23:31:13 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20macos=E6=89=93=E5=8C=85=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=85=AC=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd86e27..6d6d872 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,8 +42,7 @@ jobs: - name: Install .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: | - 6.0.x + dotnet-version: '6.0.x' - name: Read Version Text id: version uses: juliangruber/read-file-action@v1 @@ -111,8 +110,7 @@ jobs: - name: Install .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: | - 6.0.x + dotnet-version: '6.0.x' - name: Read Version Text id: version uses: juliangruber/read-file-action@v1 @@ -172,8 +170,7 @@ jobs: - name: Install .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: | - 6.0.x + dotnet-version: '6.0.x' - name: Read Version Text id: version uses: juliangruber/read-file-action@v1 @@ -200,7 +197,14 @@ jobs: chmod +x sign.sh ./sign.sh working-directory: ./script/macos - - name: Create DMG + - name: Notarize app + run: | + ditto -c -k --sequesterRsrc --keepParent 哔哩下载姬.app 哔哩下载姬.zip + xcrun notarytool submit 哔哩下载姬.zip --apple-id "${{ secrets.APPLE_ID }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_SPECIFIC_PASSWORD }}" --wait + xcrun stapler staple 哔哩下载姬.app + rm -rf ./哔哩下载姬.zip + working-directory: ./script/macos + - name: Create DMG run: | create-dmg \ --hdiutil-quiet \ @@ -210,6 +214,11 @@ jobs: --window-size 660 400 \ DownKyi-${{ steps.version.outputs.content }}-osx-${{ matrix.cpu }}.dmg 哔哩下载姬.app working-directory: ./script/macos + - name: Notarize DMG + run: | + xcrun notarytool submit DownKyi-${{ steps.version.outputs.content }}-osx-${{ matrix.cpu }}.dmg --apple-id "${{ secrets.APPLE_ID }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_SPECIFIC_PASSWORD }}" --wait + xcrun stapler staple DownKyi-${{ steps.version.outputs.content }}-osx-${{ matrix.cpu }}.dmg + working-directory: ./script/macos - name: Upload build artifacts uses: actions/upload-artifact@v4 with: