@@ -116,135 +116,135 @@ jobs:
116116 # =========================================================================================
117117 # macOS Build
118118 # =========================================================================================
119- # build-macos:
120- # runs-on: macos-latest
121- # steps:
122- # - name: Export Variables
123- # run: |
124- # echo "BUILD_ARTIFACTS_DIR=$BUILD_DIR/src/${{env.PROJECT_NAME}}Plugin_artefacts/Release" >> $GITHUB_ENV
125- # echo "MAC_PACKAGE=${{env.BUNDLE_NAME}}-snapshot-macos.pkg" >> $GITHUB_ENV
126-
127- # - name: Checkout Code
128- # uses: actions/checkout@v4
129-
130- # - name: Set Up Mac
131- # run: brew install ninja osxutils
132-
133- # - name: Select CMake Preset
134- # run: |
135- # cmake --preset "Mac Release" \
136- # -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
137-
138- # - name: Build
139- # run: cmake --build build --config "Release"
140-
141- # - name: Copy Build Artifacts
142- # run: |
143- # mkdir -p artifacts
144- # cp -r ${{env.BUILD_ARTIFACTS_DIR}}/VST3/${{env.PROJECT_NAME}}.vst3 \
145- # artifacts/
146- # cp -r ${{env.BUILD_ARTIFACTS_DIR}}/CLAP/${{env.PROJECT_NAME}}.clap \
147- # artifacts/
148- # cp -r ${{env.BUILD_ARTIFACTS_DIR}}/AU/${{env.PROJECT_NAME}}.component \
149- # artifacts/
150- # shell: bash
151-
152- # - name: Import Certificates
153- # uses: sudara/basic-macos-keychain-action@v1
154- # id: keychain
155- # with:
156- # dev-id-app-cert: ${{ secrets.DEV_ID_APP_CERT }}
157- # dev-id-app-password: ${{ secrets.DEV_ID_PASSWORD }}
158- # dev-id-installer-cert: ${{ secrets.DEV_ID_INSTALL_CERT }}
159- # dev-id-installer-password: ${{ secrets.DEV_ID_PASSWORD }}
160-
161- # - name: Codesign (macOS)
162- # run: |
163- # # Set variables
164- # VST3_BIN="artifacts/${{env.PROJECT_NAME}}.vst3/Contents/MacOS/${{env.PROJECT_NAME}}"
165- # CLAP_BIN="artifacts/${{env.PROJECT_NAME}}.clap/Contents/MacOS/${{env.PROJECT_NAME}}"
166- # AU_BIN="artifacts/${{env.PROJECT_NAME}}.component/Contents/MacOS/${{env.PROJECT_NAME}}"
167-
168- # # Codesign the binaries
169- # codesign \
170- # --force -s "${{secrets.DEVELOPER_ID_APPLICATION}}" \
171- # -v "$VST3_BIN" \
172- # --deep --strict --options=runtime --timestamp
173- # codesign \
174- # --force -s "${{secrets.DEVELOPER_ID_APPLICATION}}" \
175- # -v "$CLAP_BIN" \
176- # --deep --strict --options=runtime --timestamp
177- # codesign \
178- # --force -s "${{secrets.DEVELOPER_ID_APPLICATION}}" \
179- # -v "$AU_BIN" \
180- # --deep --strict --options=runtime --timestamp
181- # shell: bash
182-
183- # - name: Create Installer
184- # run: |
185- # # Set variables
186- # VST3_PATH="artifacts/${{env.PROJECT_NAME}}.vst3"
187- # CLAP_PATH="artifacts/${{env.PROJECT_NAME}}.clap"
188- # AU_PATH="artifacts/${{env.PROJECT_NAME}}.component"
189- # PACKAGE_NAME="${{env.PROJECT_NAME}}-snapshot-macos.pkg"
190-
191- # # Create the packaging directory
192- # mkdir -p packaging
193-
194- # # Create the distribution file
195- # envsubst < pkg/mac/distribution.xml > packaging/distribution.xml
196-
197- # # Create the VST subpackage
198- # pkgbuild \
199- # --identifier "${{env.BUNDLE_ID}}.vst3.pkg" \
200- # --version "$VERSION" \
201- # --component "$VST3_PATH" \
202- # --install-location "/Library/Audio/Plug-Ins/VST3" \
203- # "packaging/${{env.PROJECT_NAME}}.vst3.pkg"
204-
205- # # Create the CLAP subpackage
206- # pkgbuild \
207- # --identifier "${{env.BUNDLE_ID}}.clap.pkg" \
208- # --version "$VERSION" \
209- # --component "$CLAP_PATH" \
210- # --install-location "/Library/Audio/Plug-Ins/CLAP" \
211- # "packaging/${{env.PROJECT_NAME}}.clap.pkg"
212-
213- # # Create the AU subpackage
214- # pkgbuild \
215- # --identifier "${{env.BUNDLE_ID}}.au.pkg" \
216- # --version "$VERSION" \
217- # --component "$AU_PATH" \
218- # --install-location "/Library/Audio/Plug-Ins/Components" \
219- # "packaging/${{env.PROJECT_NAME}}.au.pkg"
220-
221- # # Create the main package
222- # cd packaging
223- # productbuild \
224- # --resources ./resources \
225- # --distribution distribution.xml \
226- # --sign "${{secrets.DEVELOPER_ID_INSTALLER}}" \
227- # --timestamp "${{env.PROJECT_NAME}}.pkg"
228-
229- # # Notarize the package
230- # xcrun notarytool submit "${{env.PROJECT_NAME}}.pkg" \
231- # --apple-id ${{secrets.NOTARIZATION_USERNAME}} \
232- # --password ${{secrets.NOTARIZATION_PASSWORD}} \
233- # --team-id ${{secrets.TEAM_ID}} \
234- # --wait
235-
236- # # Staple the package
237- # xcrun stapler staple "${{env.PROJECT_NAME}}.pkg"
238-
239- # # Move the package to the artifacts directory
240- # mv ${{env.PROJECT_NAME}}.pkg ../artifacts/${{env.MAC_PACKAGE}}
241- # shell: bash
242-
243- # - name: Upload Artifacts
244- # uses: actions/upload-artifact@v4
245- # with:
246- # name: artifacts-macos
247- # path: artifacts
119+ build-macos :
120+ runs-on : macos-latest
121+ steps :
122+ - name : Export Variables
123+ run : |
124+ echo "BUILD_ARTIFACTS_DIR=$BUILD_DIR/src/${{env.PROJECT_NAME}}Plugin_artefacts/Release" >> $GITHUB_ENV
125+ echo "MAC_PACKAGE=${{env.BUNDLE_NAME}}-snapshot-macos.pkg" >> $GITHUB_ENV
126+
127+ - name : Checkout Code
128+ uses : actions/checkout@v4
129+
130+ - name : Set Up Mac
131+ run : brew install ninja osxutils
132+
133+ - name : Select CMake Preset
134+ run : |
135+ cmake --preset "Mac Release" \
136+ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
137+
138+ - name : Build
139+ run : cmake --build build --config "Release"
140+
141+ - name : Copy Build Artifacts
142+ run : |
143+ mkdir -p artifacts
144+ cp -r ${{env.BUILD_ARTIFACTS_DIR}}/VST3/${{env.PROJECT_NAME}}.vst3 \
145+ artifacts/
146+ cp -r ${{env.BUILD_ARTIFACTS_DIR}}/CLAP/${{env.PROJECT_NAME}}.clap \
147+ artifacts/
148+ cp -r ${{env.BUILD_ARTIFACTS_DIR}}/AU/${{env.PROJECT_NAME}}.component \
149+ artifacts/
150+ shell : bash
151+
152+ - name : Import Certificates
153+ uses : sudara/basic-macos-keychain-action@v1
154+ id : keychain
155+ with :
156+ dev-id-app-cert : ${{ secrets.DEV_ID_APP_CERT }}
157+ dev-id-app-password : ${{ secrets.DEV_ID_PASSWORD }}
158+ dev-id-installer-cert : ${{ secrets.DEV_ID_INSTALL_CERT }}
159+ dev-id-installer-password : ${{ secrets.DEV_ID_PASSWORD }}
160+
161+ - name : Codesign (macOS)
162+ run : |
163+ # Set variables
164+ VST3_BIN="artifacts/${{env.PROJECT_NAME}}.vst3/Contents/MacOS/${{env.PROJECT_NAME}}"
165+ CLAP_BIN="artifacts/${{env.PROJECT_NAME}}.clap/Contents/MacOS/${{env.PROJECT_NAME}}"
166+ AU_BIN="artifacts/${{env.PROJECT_NAME}}.component/Contents/MacOS/${{env.PROJECT_NAME}}"
167+
168+ # Codesign the binaries
169+ codesign \
170+ --force -s "${{secrets.DEVELOPER_ID_APPLICATION}}" \
171+ -v "$VST3_BIN" \
172+ --deep --strict --options=runtime --timestamp
173+ codesign \
174+ --force -s "${{secrets.DEVELOPER_ID_APPLICATION}}" \
175+ -v "$CLAP_BIN" \
176+ --deep --strict --options=runtime --timestamp
177+ codesign \
178+ --force -s "${{secrets.DEVELOPER_ID_APPLICATION}}" \
179+ -v "$AU_BIN" \
180+ --deep --strict --options=runtime --timestamp
181+ shell : bash
182+
183+ - name : Create Installer
184+ run : |
185+ # Set variables
186+ VST3_PATH="artifacts/${{env.PROJECT_NAME}}.vst3"
187+ CLAP_PATH="artifacts/${{env.PROJECT_NAME}}.clap"
188+ AU_PATH="artifacts/${{env.PROJECT_NAME}}.component"
189+ PACKAGE_NAME="${{env.PROJECT_NAME}}-snapshot-macos.pkg"
190+
191+ # Create the packaging directory
192+ mkdir -p packaging
193+
194+ # Create the distribution file
195+ envsubst < pkg/mac/distribution.xml > packaging/distribution.xml
196+
197+ # Create the VST subpackage
198+ pkgbuild \
199+ --identifier "${{env.BUNDLE_ID}}.vst3.pkg" \
200+ --version "$VERSION" \
201+ --component "$VST3_PATH" \
202+ --install-location "/Library/Audio/Plug-Ins/VST3" \
203+ "packaging/${{env.PROJECT_NAME}}.vst3.pkg"
204+
205+ # Create the CLAP subpackage
206+ pkgbuild \
207+ --identifier "${{env.BUNDLE_ID}}.clap.pkg" \
208+ --version "$VERSION" \
209+ --component "$CLAP_PATH" \
210+ --install-location "/Library/Audio/Plug-Ins/CLAP" \
211+ "packaging/${{env.PROJECT_NAME}}.clap.pkg"
212+
213+ # Create the AU subpackage
214+ pkgbuild \
215+ --identifier "${{env.BUNDLE_ID}}.au.pkg" \
216+ --version "$VERSION" \
217+ --component "$AU_PATH" \
218+ --install-location "/Library/Audio/Plug-Ins/Components" \
219+ "packaging/${{env.PROJECT_NAME}}.au.pkg"
220+
221+ # Create the main package
222+ cd packaging
223+ productbuild \
224+ --resources ./resources \
225+ --distribution distribution.xml \
226+ --sign "${{secrets.DEVELOPER_ID_INSTALLER}}" \
227+ --timestamp "${{env.PROJECT_NAME}}.pkg"
228+
229+ # Notarize the package
230+ xcrun notarytool submit "${{env.PROJECT_NAME}}.pkg" \
231+ --apple-id ${{secrets.NOTARIZATION_USERNAME}} \
232+ --password ${{secrets.NOTARIZATION_PASSWORD}} \
233+ --team-id ${{secrets.TEAM_ID}} \
234+ --wait
235+
236+ # Staple the package
237+ xcrun stapler staple "${{env.PROJECT_NAME}}.pkg"
238+
239+ # Move the package to the artifacts directory
240+ mv ${{env.PROJECT_NAME}}.pkg ../artifacts/${{env.MAC_PACKAGE}}
241+ shell : bash
242+
243+ - name : Upload Artifacts
244+ uses : actions/upload-artifact@v4
245+ with :
246+ name : artifacts-macos
247+ path : artifacts
248248
249249 # =========================================================================================
250250 # Ubuntu Linux Build
0 commit comments