@@ -47,11 +47,17 @@ jobs:
4747 with :
4848 name : builds-${{ env.GOARCH }}
4949 path : |
50- dify-plugin-windows-${{ env.GOARCH }}.exe
5150 dify-plugin-darwin-${{ env.GOARCH }}
52- dify-plugin-linux-${{ env.GOARCH }}
5351
54- sign-macos-binary :
52+ - name : Upload windows/linux binaries to release
53+ if : github.event_name == 'release'
54+ run : |
55+ gh release upload ${{ github.event.release.tag_name }} dify-plugin-windows-${{ env.GOARCH }}.exe --clobber
56+ gh release upload ${{ github.event.release.tag_name }} dify-plugin-linux-${{ env.GOARCH }} --clobber
57+ env :
58+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59+
60+ sign-macos-binary-and-upload :
5561 needs : build
5662 runs-on : macos-latest
5763 if : github.repository == 'langgenius/dify-plugin-daemon'
@@ -75,61 +81,46 @@ jobs:
7581 with :
7682 name : builds-amd64
7783
78- - name : Sign arm64 binary
84+ - name : Sign binaries
7985 run : |
8086 codesign --timestamp --options=runtime --sign "${{ secrets.MACOS_CERT_NAME }}" ./dify-plugin-darwin-arm64
81-
82- - name : Sign amd64 binary
83- run : |
8487 codesign --timestamp --options=runtime --sign "${{ secrets.MACOS_CERT_NAME }}" ./dify-plugin-darwin-amd64
8588
86- - name : Create zip for arm64 notarization
89+ - name : Create zip for notarization
8790 run : |
8891 zip -r dify-plugin-darwin-arm64.zip ./dify-plugin-darwin-arm64
89-
90- - name : Create zip for amd64 notarization
91- run : |
9292 zip -r dify-plugin-darwin-amd64.zip ./dify-plugin-darwin-amd64
9393
94- - name : Notarize arm64 binary
94+ - name : Notarize binaries
9595 run : |
9696 xcrun notarytool submit dify-plugin-darwin-arm64.zip \
9797 --apple-id "${{ secrets.AC_USERNAME }}" \
9898 --password "${{ secrets.AC_PASSWORD }}" \
9999 --team-id "${{ secrets.TEAM_ID }}" \
100- --wait
101-
102- - name : Notarize amd64 binary
103- run : |
100+ --wait &
101+
104102 xcrun notarytool submit dify-plugin-darwin-amd64.zip \
105103 --apple-id "${{ secrets.AC_USERNAME }}" \
106104 --password "${{ secrets.AC_PASSWORD }}" \
107105 --team-id "${{ secrets.TEAM_ID }}" \
108- --wait
106+ --wait &
107+
108+ wait
109109
110- - name : Staple notarization ticket to arm64 binary
110+ - name : Staple notarization ticket to binaries
111111 run : |
112112 xcrun stapler staple ./dify-plugin-darwin-arm64
113-
114- - name : Staple notarization ticket to amd64 binary
115- run : |
116113 xcrun stapler staple ./dify-plugin-darwin-amd64
117114
118- - name : Verify arm64 signature
115+ - name : Verify signatures
119116 run : |
120117 spctl --assess --type exec --verbose=4 ./dify-plugin-darwin-arm64
121-
122- - name : Verify amd64 signature
123- run : |
124118 spctl --assess --type exec --verbose=4 ./dify-plugin-darwin-amd64
125119
126120 - name : Upload signed binaries
121+ if : github.event_name == 'release'
127122 run : |
128- gh release upload ${{ github.event.release.tag_name }} dify-plugin-windows-arm64.exe --clobber
129123 gh release upload ${{ github.event.release.tag_name }} dify-plugin-darwin-arm64 --clobber
130- gh release upload ${{ github.event.release.tag_name }} dify-plugin-linux-arm64 --clobber
131- gh release upload ${{ github.event.release.tag_name }} dify-plugin-windows-amd64.exe --clobber
132124 gh release upload ${{ github.event.release.tag_name }} dify-plugin-darwin-amd64 --clobber
133- gh release upload ${{ github.event.release.tag_name }} dify-plugin-linux-amd64 --clobber
134125 env :
135126 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments