Implement AppJail menu bar utility #1
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 & Release | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| name: Build AppJail | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Select latest Xcode | |
| run: | | |
| XCODE_PATH=$(ls -d /Applications/Xcode*.app 2>/dev/null | sort -V | tail -1) | |
| if [ -z "$XCODE_PATH" ]; then | |
| echo "No Xcode found" | |
| exit 1 | |
| fi | |
| echo "Using $XCODE_PATH" | |
| sudo xcode-select -s "$XCODE_PATH" | |
| xcodebuild -version | |
| - name: Build | |
| run: | | |
| xcodebuild -project appjail.xcodeproj \ | |
| -scheme appjail \ | |
| -configuration Release \ | |
| -derivedDataPath build \ | |
| CODE_SIGN_IDENTITY="-" \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO | |
| - name: Create DMG | |
| run: | | |
| APP_PATH="build/Build/Products/Release/appjail.app" | |
| DMG_NAME="AppJail.dmg" | |
| mkdir -p dmg_staging | |
| cp -R "$APP_PATH" dmg_staging/ | |
| # Create a symlink to /Applications for drag-install | |
| ln -s /Applications dmg_staging/Applications | |
| hdiutil create -volname "AppJail" \ | |
| -srcfolder dmg_staging \ | |
| -ov -format UDZO \ | |
| "$DMG_NAME" | |
| - name: Upload DMG artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AppJail-DMG | |
| path: AppJail.dmg | |
| release: | |
| name: Create Release | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download DMG | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: AppJail-DMG | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: AppJail.dmg | |
| generate_release_notes: true |