diff --git a/.github/workflows/artcraft-macos-publish.yml b/.github/workflows/artcraft-macos-publish.yml index fa73edbda8..65e5107639 100644 --- a/.github/workflows/artcraft-macos-publish.yml +++ b/.github/workflows/artcraft-macos-publish.yml @@ -5,7 +5,7 @@ on: branches: - release - artcraft-release - - artcraft-macos # Additional branch for MacOS testing + - artcraft-macos # Additional branch for MacOS testing # This workflow creates Universal macOS builds with signing certificate support. # On each push to the release branches it will create or update a GitHub release, build your app, and upload the artifacts to the release. @@ -19,8 +19,8 @@ jobs: matrix: include: # Universal macOS builds (arm64 and x86_64) - - platform: 'macos-latest-xlarge' - args: '--target universal-apple-darwin' + - platform: "macos-latest-xlarge" + args: "--target universal-apple-darwin" # Uncomment below for additional platforms # - platform: 'ubuntu-22.04' # args: '' @@ -199,16 +199,15 @@ jobs: # Update Tauri config to skip the build (since we already built) cd ${{ github.workspace }}/crates/desktop/artcraft - cp tauri.conf.json tauri.conf.json.bak + cp tauri-mac.conf.json tauri-mac.conf.json.bak # Set beforeBuildCommand to empty or a no-op command if command -v jq &> /dev/null; then - jq '.build.beforeBuildCommand = ""' tauri.conf.json > tauri.conf.json.tmp - mv tauri.conf.json.tmp tauri.conf.json + jq '.build.beforeBuildCommand = ""' tauri-mac.conf.json > tauri-mac.conf.json.tmp + mv tauri-mac.conf.json.tmp tauri-mac.conf.json else - node -e "const fs = require('fs'); const config = JSON.parse(fs.readFileSync('tauri.conf.json', 'utf8')); config.build.beforeBuildCommand = ''; fs.writeFileSync('tauri.conf.json', JSON.stringify(config, null, 2));" + node -e "const fs = require('fs'); const config = JSON.parse(fs.readFileSync('tauri-mac.conf.json', 'utf8')); config.build.beforeBuildCommand = ''; fs.writeFileSync('tauri-mac.conf.json', JSON.stringify(config, null, 2));" fi - - name: build and publish uses: tauri-apps/tauri-action@v0 env: @@ -229,4 +228,4 @@ jobs: releaseBody: "See the assets to download this version and install." releaseDraft: true prerelease: false - args: ${{ matrix.args }} \ No newline at end of file + args: ${{ matrix.args }} diff --git a/crates/desktop/artcraft/tauri-mac.conf.json b/crates/desktop/artcraft/tauri-mac.conf.json new file mode 100644 index 0000000000..3e6e4ef5d9 --- /dev/null +++ b/crates/desktop/artcraft/tauri-mac.conf.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://schema.tauri.app/config/2.0.0-rc", + "productName": "ArtCraft", + "version": "0.0.1", + "identifier": "ai.artcraft.app", + "build": { + "frontendDist": "../../../frontend/apps/editor3d/dist", + "devUrl": "http://localhost:5173", + "beforeDevCommand": "nx run editor3d:dev", + "beforeBuildCommand": "nx run editor3d:build" + }, + "app": { + "windows": [ + { + "title": "ArtCraft", + "width": 2400, + "height": 1300, + "resizable": true, + "fullscreen": false, + "decorations": true, + "dragDropEnabled": false + } + ], + "security": { + "csp": { + "default-src": [ + "'self'", + "'unsafe-eval'", + "'unsafe-inline'", + "blob:", + "data:", + "https://*.fakeyou.com", + "https://*.storyteller.ai", + "https://www.google-analytics.com", + "https://www.googletagmanager.com", + "ipc://localhost", + "tauri://localhost" + ], + "connect-src": [ + "'self'", + "'unsafe-eval'", + "'unsafe-inline'", + "blob:", + "data:", + "http://ipc.localhost", + "https://*.fakeyou.com", + "https://*.storyteller.ai", + "https://unpkg.com/detect-gpu@5.0.70/", + "https://www.google-analytics.com", + "https://www.googletagmanager.com", + "ipc://localhost", + "tauri://localhost" + ], + "font-src": "*", + "img-src": "* data: blob: 'unsafe-inline'", + "style-src": [ + "'self'", + "'unsafe-eval'", + "'unsafe-inline'", + "blob:", + "data:", + "https://*.fakeyou.com", + "https://*.storyteller.ai", + "https://fonts.googleapis.com", + "ipc://localhost", + "tauri://localhost" + ] + } + } + }, + "bundle": { + "active": true, + "targets": "all", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ] + } +}