55 push :
66 tags :
77 - ' *'
8+
89jobs :
910 build-and-release-linux :
1011 runs-on : ubuntu-latest
3940 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4041 with :
4142 files : build/linux/x64/release/bundle/OpenView2-linux.zip
43+
44+
4245 build-and-release-windows :
4346 runs-on : windows-latest
47+
4448 steps :
4549 - uses : actions/checkout@v3
4650 - uses : subosito/flutter-action@v1
6872 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6973 with :
7074 files : build/windows/x64/runner/Release/OpenView2-windows.zip
75+
7176 build-and-release-macos :
7277 runs-on : macos-latest
7378 steps :
@@ -81,91 +86,16 @@ jobs:
8186 - run : flutter config --enable-macos-desktop
8287 - run : brew install automake libtool
8388 - name : Build artifacts
84- run : flutter build macos --release
89+ run : flutter build macos --release
8590 - name : Rename app
8691 working-directory : .
8792 run : |
88- mv build/macos/Build/Products/Release/protocentral_openview_mobile.app ./OpenView2.app
89-
90- # Notarization steps
91- - name : Setup Xcode
92- run : sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
93-
94- - name : Import Apple Certificate
95- run : |
96- # Create a temporary certificate file from base64
97- echo "${{ secrets.AC_CERTIFICATE }}" | base64 --decode > certificate.p12
98-
99- # Create temporary keychain
100- security create-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
101- security default-keychain -s build.keychain
102- security unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
103-
104- # Import certificate into keychain
105- security import certificate.p12 -k build.keychain -P "${{ secrets.AC_CERTIFICATE_PASSWORD }}" -T /usr/bin/codesign
106-
107- # Set key partition list (required for CI/CD)
108- security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
109-
110- # Verify import
111- echo "=== Certificate imported successfully ==="
112- security find-identity -v build.keychain
113-
114- # Cleanup
115- rm certificate.p12
116-
117- - name : List Available Certificates
118- run : |
119- echo "=== Listing all available certificates ==="
120- security find-identity -v -p codesigning
121- echo ""
122- echo "=== Checking keychain status ==="
123- security list-keychains
124-
125- - name : Sign Application
126- run : |
127- # Find the certificate - try multiple patterns
128- CERT_NAME=$(security find-identity -v -p codesigning | grep -i "developer id" | awk -F '"' '{print $2}' | head -1)
129-
130- if [ -z "$CERT_NAME" ]; then
131- echo "Developer ID certificate not found, trying all certificates..."
132- CERT_NAME=$(security find-identity -v -p codesigning | awk -F '"' '{print $2}' | grep -v "^$" | head -1)
133- fi
134-
135- if [ -z "$CERT_NAME" ]; then
136- echo "ERROR: No codesigning certificates found!"
137- echo "Available identities:"
138- security find-identity -v
139- exit 1
140- fi
141-
142- echo "Using certificate: $CERT_NAME"
143- codesign --deep --force --verify --verbose --sign "$CERT_NAME" ./OpenView2.app
144-
145- - name : Create DMG
146- run : |
147- hdiutil create -volname "OpenView2" -srcfolder ./OpenView2.app -ov -format UDZO OpenView2.dmg
148-
149- - name : Notarize Application
150- run : |
151- xcrun notarytool submit OpenView2.dmg \
152- --apple-id "${{ secrets.APPLE_ID }}" \
153- --password "${{ secrets.APPLE_PASSWORD }}" \
154- --team-id "${{ secrets.APPLE_TEAM_ID }}" \
155- --wait
156-
157- - name : Staple Notarization
158- run : |
159- xcrun stapler staple OpenView2.dmg
160-
161- - name : Create Final Archive
162- run : |
163- zip -r OpenView2-macos.zip OpenView2.dmg
164-
165- - name : macOS Release
93+ mv build/macos/Build/Products/Release/protocentral_openview_mobile.app ./OpenView2.app
94+ zip -r OpenView2-macos.zip ./OpenView2.app
95+ - name : Windows Release
16696 uses : softprops/action-gh-release@v1
16797 if : startsWith(github.ref, 'refs/tags/')
16898 env :
16999 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
170100 with :
171- files : OpenView2-macos.zip
101+ files : ./ OpenView2-macos.zip
0 commit comments