Build CaptureStream2 Launchers #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build CaptureStream2 Launchers | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Platypus | |
| run: | | |
| brew install --cask platypus | |
| sudo ln -s /Applications/Platypus.app/Contents/MacOS/Platypus /usr/local/bin/platypus | |
| - name: Create Automator Workflow | |
| run: | | |
| mkdir -p CaptureStreamRunner.workflow/Contents | |
| cat > CaptureStreamRunner.workflow/Contents/document.wflow << 'EOF' | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>actions</key> | |
| <array> | |
| <dict> | |
| <key>action</key> | |
| <string>com.apple.cocoa.applescript</string> | |
| <key>parameters</key> | |
| <dict> | |
| <key>script</key> | |
| <string>do shell script "/Applications/CaptureStream2.app/Contents/MacOS/CaptureStream2 -nogui"</string> | |
| </dict> | |
| </dict> | |
| </array> | |
| <key>workflowType</key> | |
| <string>Automator</string> | |
| </dict> | |
| </plist> | |
| EOF | |
| - name: Create Platypus App | |
| run: | | |
| mkdir -p platypus_output | |
| echo '#!/bin/bash' > platypus_output/launch.sh | |
| echo 'exec "/Applications/CaptureStream2.app/Contents/MacOS/CaptureStream2" -nogui' >> platypus_output/launch.sh | |
| chmod +x platypus_output/launch.sh | |
| platypus \ | |
| -a "CaptureStream2 Launcher" \ | |
| -o None \ | |
| -p "/bin/bash" \ | |
| -i /System/Applications/Utilities/Terminal.app/Contents/Resources/Terminal.icns \ | |
| platypus_output/launch.sh \ | |
| CaptureStreamRunner.app | |
| - name: Create DMG | |
| run: | | |
| mkdir -p dmg_content | |
| cp -R CaptureStreamRunner.workflow dmg_content/ | |
| cp -R CaptureStreamRunner.app dmg_content/ | |
| hdiutil create -volname "CaptureStream2 Launchers" -srcfolder dmg_content -ov -format UDZO CaptureStream2Launchers.dmg | |
| - name: Upload DMG Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CaptureStream2Launchers-dmg | |
| path: CaptureStream2Launchers.dmg | |
| retention-days: 7 |