From a9f27fc82a61495d6f61ebc76f143d8cdfd0e131 Mon Sep 17 00:00:00 2001 From: qwertyyb Date: Sun, 17 Sep 2023 18:21:25 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E4=BF=AE=E5=A4=8Dnotarize=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-app.yml | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-app.yml b/.github/workflows/publish-app.yml index 2bc407b..7da8489 100644 --- a/.github/workflows/publish-app.yml +++ b/.github/workflows/publish-app.yml @@ -42,16 +42,33 @@ jobs: number=`date +%Y%m%d%H%M%S` flutter build macos --build-name=$version --build-number=$number - - name: "Notarize Release Build" - uses: devbotsxyz/xcode-notarize@v1 - with: - product-path: "build/macos/Build/Products/Release/public tools.app" - appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }} - appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }} - - name: zip *.app run: ditto -c -k --sequesterRsrc --keepParent "build/macos/Build/Products/Release/public tools.app" "build/macos/Build/Products/Release/public tools.zip" + - name: "Notarize Release Build" + env: + AC_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }} + AC_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }} + TEAM_ID: ${{ secrets.TEAM_ID }} + run: | + echo "notarize app" + notarize_response=`xcrun notarytool submit "build/macos/Build/Products/Release/public tools.zip" --apple-id "$AC_USERNAME" --password "$AC_PASSWORD" --team-id "$TEAM_ID" --wait --progress` + echo "$notarize_response" + + echo "check status" + + t=`echo "$notarize_response" | grep "status: Accepted"` + f=`echo "$notarize_response" | grep "Invalid"` + if [[ "$t" != "" ]]; then + echo "notarization done!" + xcrun stapler staple "build/macos/Build/Products/Release/public tools.app" + echo "stapler done!" + fi + if [[ "$f" != "" ]]; then + echo "notarization failed" + exit 1 + fi + - uses: actions/upload-artifact@v2 with: name: build-app