1111 - ' Source/**'
1212 - ' CMakeLists.txt'
1313 - ' HelperFunctions.cmake'
14+ pull_request :
15+ paths :
16+ - ' .github/workflows/**'
17+ - ' JuceLibraryCode/**'
18+ - ' PluginGenerator/**'
19+ - ' Plugins/**'
20+ - ' Resources/**'
21+ - ' Source/**'
22+ - ' CMakeLists.txt'
23+ - ' HelperFunctions.cmake'
1424
1525jobs :
1626 build-osx :
3242 run : |
3343 cd Build
3444 xcodebuild -configuration Release
35- # - name: test
36- # run: cd build && ctest
37- - name : deploy_dev
38- if : github.ref == 'refs/heads/development-juce8'
45+ - name : deploy
3946 env :
4047 ARTIFACTORY_ACCESS_TOKEN : ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
4148 MACOS_CERTIFICATE : ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
@@ -46,68 +53,22 @@ jobs:
4653 PROD_MACOS_NOTARIZATION_TEAM_ID : ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
4754 PROD_MACOS_NOTARIZATION_PWD : ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
4855 run : |
49- cd Build/Release
50- mkdir open-ephys
51- mv Open\ Ephys\ GUI.app open-ephys
52-
53- # Turn our base64-encoded certificate back to a regular .p12 file
54- echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
55-
56- # We need to create a new keychain, otherwise using the certificate will prompt
57- # with a UI dialog asking for the certificate password, which we can't
58- # use in a headless CI environment
59- security create-keychain -p $MACOS_CI_KEYCHAIN_PWD build.keychain
60- security default-keychain -s build.keychain
61- security unlock-keychain -p $MACOS_CI_KEYCHAIN_PWD build.keychain
62- security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
63- security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_CI_KEYCHAIN_PWD build.keychain
64- /usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" -v open-ephys/Open\ Ephys\ GUI.app --deep --strict --timestamp --options=runtime --entitlements ../../Resources/Build-files/entitlements.plist
65-
66- /usr/bin/codesign -dv --verbose=4 --entitlements - open-ephys/Open\ Ephys\ GUI.app
67-
68- # Store the notarization credentials so that we can prevent a UI password dialog from blocking the CI
69-
70- echo "Create keychain profile"
71- xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
72-
73- # We can't notarize an app bundle directly, but we need to compress it as an archive.
74- # Therefore, we create a zip file containing our app bundle, so that we can send it to the
75- # notarization service
56+ gui_ver=v$(grep -w CMakeLists.txt -e 'GUI_VERSION' | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z\.-]+))?")
57+
58+ if [ ${{github.ref_name}} == 'development' ]; then
59+ version_suffix=-dev
60+ artifactory_repo=Dev
61+ gui_ver=latest
62+ elif [ ${{github.ref_name}} == 'testing' ]; then
63+ version_suffix=-beta
64+ artifactory_repo=Test
65+ elif [ ${{github.ref_name}} == 'main' ]; then
66+ artifactory_repo=Release
67+ else
68+ echo "This branch is not configured for deployment."
69+ exit 0
70+ fi
7671
77- echo "Creating temp notarization archive"
78- /usr/bin/ditto -c -k --sequesterRsrc --keepParent open-ephys/Open\ Ephys\ GUI.app open-ephys.zip
79-
80- # Here we send the notarization request to the Apple's Notarization service, waiting for the result.
81- # This typically takes a few seconds inside a CI environment, but it might take more depending on the App
82- # characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
83- # you're curious
84-
85- echo "Notarize app"
86- xcrun notarytool submit "open-ephys.zip" --keychain-profile "notarytool-profile" --wait
87-
88- # Finally, we need to "attach the staple" to our executable, which will allow our app to be
89- # validated by macOS even when an internet connection is not available.
90- echo "Attach staple"
91- rm -r open-ephys/*
92- /usr/bin/ditto -x -k open-ephys.zip open-ephys
93- xcrun stapler staple open-ephys/Open\ Ephys\ GUI.app
94-
95- zipfile=open-ephys-v1.0.0-dev-mac.zip
96- /usr/bin/ditto -c -k --sequesterRsrc --keepParent open-ephys $zipfile
97- user_info="X-JFrog-Art-Api:$ARTIFACTORY_ACCESS_TOKEN"
98- curl -H $user_info -T $zipfile "https://openephys.jfrog.io/artifactory/GUI-binaries/1.0.0-dev/mac/$zipfile"
99- - name : deploy_preview
100- if : github.ref == 'refs/heads/testing-juce8'
101- env :
102- ARTIFACTORY_ACCESS_TOKEN : ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
103- MACOS_CERTIFICATE : ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
104- MACOS_CERTIFICATE_PWD : ${{ secrets.BUILD_CERTIFICATE_PWD }}
105- MACOS_CERTIFICATE_NAME : ${{ secrets.BUILD_CERTIFICATE_NAME }}
106- MACOS_CI_KEYCHAIN_PWD : ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
107- PROD_MACOS_NOTARIZATION_APPLE_ID : ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
108- PROD_MACOS_NOTARIZATION_TEAM_ID : ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
109- PROD_MACOS_NOTARIZATION_PWD : ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
110- run : |
11172 cd Build/Release
11273 mkdir open-ephys
11374 mv Open\ Ephys\ GUI.app open-ephys
@@ -154,10 +115,10 @@ jobs:
154115 /usr/bin/ditto -x -k open-ephys.zip open-ephys
155116 xcrun stapler staple open-ephys/Open\ Ephys\ GUI.app
156117
157- zipfile=open-ephys-v1.0.0-alpha.1- mac.zip
118+ zipfile=open-ephys-${gui_ver}- mac${version_suffix} .zip
158119 /usr/bin/ditto -c -k --sequesterRsrc --keepParent open-ephys $zipfile
159120 user_info="X-JFrog-Art-Api:$ARTIFACTORY_ACCESS_TOKEN"
160- curl -H $user_info -T $zipfile "https://openephys.jfrog.io/artifactory/GUI-binaries/1.0.0-alpha /mac/$zipfile"
121+ curl -H $user_info -T $zipfile "https://openephys.jfrog.io/artifactory/GUI-binaries/${artifactory_repo} /mac/$zipfile"
161122
162123 # Create a DMG installer
163124 brew install create-dmg && create-dmg \
@@ -173,7 +134,7 @@ jobs:
173134 "Open-Ephys-Installer.dmg" \
174135 "open-ephys/"
175136
176- installer=Open_Ephys_GUI_v1.0.0-alpha.1 .dmg
137+ installer=Open_Ephys_GUI_${gui_ver}${version_suffix} .dmg
177138 mv -v Open-Ephys-Installer.dmg $installer
178139
179140 echo "Notarize DMG"
@@ -182,4 +143,4 @@ jobs:
182143 echo "Attach staple to DMG"
183144 xcrun stapler staple $installer
184145
185- curl -H $user_info -T $installer "https://openephys.jfrog.io/artifactory/GUI-binaries/1.0.0-alpha /mac/$installer"
146+ curl -H $user_info -T $installer "https://openephys.jfrog.io/artifactory/GUI-binaries/${artifactory_repo}-Installer /mac/$installer"
0 commit comments