diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e30150..8e2014b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,6 +104,7 @@ jobs: platform: - os: macos-11 name: darwin+x86-64 + # TODO: #181 build for linux # - os: ubuntu-latest # name: linux+x86-64 - os: [self-hosted, macOS, ARM64] @@ -137,60 +138,10 @@ jobs: # APPLE_CERTIFICATE_PASSWORD: ${{ secrets.GUI_APPLE_CERTIFICATE_PASSWORD }} # APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} run: tea -ES xc build - build_tauri: - needs: changes - if: false - runs-on: ${{ matrix.platform.os }} - strategy: - matrix: - platform: - - os: macos-11 - name: darwin+x86-64 - - os: ubuntu-latest - name: linux+x86-64 - - os: [self-hosted, macOS, ARM64] - name: darwin+aarch64 - # err: Package atk was not found in the pkg-config search path. - # requires atk >= 2.18 - # - os: [self-hosted, linux, ARM64] - # name: linux+aarch64 - steps: - - uses: actions/checkout@v3 - - uses: teaxyz/setup@v0 - if: startsWith(matrix.platform.name, 'darwin') - - - name: cache gui build - # TODO: cache issue in our self-hosted macos runner ESPIPE: invalid seek, read - # but its ok to ignore, its still the fastest builder - # NOTE: enabling cache in the self hosted runner slows down the pipeline by 4m because post-cache builder error ^ - if: startsWith(matrix.platform.name, 'linux') || matrix.platform.name == 'darwin+x86-64' - uses: actions/cache@v3 - with: - key: ${{matrix.platform.name}}-pnpm-cargo - path: | - ./pnpm - ./target - # - name: build tauri for Linux - # uses: ./devops/linux-build - - name: build tauri for MacOS - if: startsWith(matrix.platform.name, 'darwin') - # FROM: https://tauri.app/v1/guides/distribution/sign-macos - env: - CARGO_TARGET_DIR: ${{ github.workspace }}/target - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ENABLE_CODE_SIGNING: ${{ secrets.GUI_APPLE_CERTIFICATE }} - APPLE_CERTIFICATE: ${{ secrets.GUI_APPLE_CERTIFICATE }} - APPLE_CERTIFICATE_PASSWORD: ${{ secrets.GUI_APPLE_CERTIFICATE_PASSWORD }} - APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} - run: tea -ES xc build - - - name: build tauri for Linux - if: startsWith(matrix.platform.name, 'linux') - # TODO: https://tauri.app/v1/guides/distribution/sign-linux - uses: ./devops/linux-builder - - - run: tar -czvf artifacts.tgz -C ./target/release/bundle . - + - run: mkdir -p target + - run: cp ./modules/desktop/dist/tea-0.0.0-arm64.dmg ./target + - run: cp ./modules/desktop/dist/tea-0.0.0-arm64.zip ./target + - run: tar -czvf artifacts.tgz -C ./target/ . - name: upload artifacts uses: actions/upload-artifact@v3 with: @@ -213,24 +164,84 @@ jobs: - run: tar xzf artifacts.tgz - - run: cd ./macos/ && zip -r tea.zip tea.app - # Notarize. Can take up to 10 minutes (and fail) asynchronously - - run: xcrun altool --notarize-app --username "$APPLE_ID" --password "$APPLE_PASSWORD" --primary-bundle-id "com.tea.xyz" --file ./macos/tea.zip + - run: xcrun altool --notarize-app --username "$APPLE_ID" --password "$APPLE_PASSWORD" --primary-bundle-id "xyz.tea.gui" --file ./tea.zip env: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} + # build_tauri: + # needs: changes + # if: false + # runs-on: ${{ matrix.platform.os }} + # strategy: + # matrix: + # platform: + # - os: macos-11 + # name: darwin+x86-64 + # - os: ubuntu-latest + # name: linux+x86-64 + # - os: [self-hosted, macOS, ARM64] + # name: darwin+aarch64 + # # err: Package atk was not found in the pkg-config search path. + # # requires atk >= 2.18 + # # - os: [self-hosted, linux, ARM64] + # # name: linux+aarch64 + # steps: + # - uses: actions/checkout@v3 + # - uses: teaxyz/setup@v0 + # if: startsWith(matrix.platform.name, 'darwin') + + # - name: cache gui build + # # TODO: cache issue in our self-hosted macos runner ESPIPE: invalid seek, read + # # but its ok to ignore, its still the fastest builder + # # NOTE: enabling cache in the self hosted runner slows down the pipeline by 4m because post-cache builder error ^ + # if: startsWith(matrix.platform.name, 'linux') || matrix.platform.name == 'darwin+x86-64' + # uses: actions/cache@v3 + # with: + # key: ${{matrix.platform.name}}-pnpm-cargo + # path: | + # ./pnpm + # ./target + # # - name: build tauri for Linux + # # uses: ./devops/linux-build + # - name: build tauri for MacOS + # if: startsWith(matrix.platform.name, 'darwin') + # # FROM: https://tauri.app/v1/guides/distribution/sign-macos + # env: + # CARGO_TARGET_DIR: ${{ github.workspace }}/target + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # ENABLE_CODE_SIGNING: ${{ secrets.GUI_APPLE_CERTIFICATE }} + # APPLE_CERTIFICATE: ${{ secrets.GUI_APPLE_CERTIFICATE }} + # APPLE_CERTIFICATE_PASSWORD: ${{ secrets.GUI_APPLE_CERTIFICATE_PASSWORD }} + # APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} + # run: tea -ES xc build + + # - name: build tauri for Linux + # if: startsWith(matrix.platform.name, 'linux') + # # TODO: https://tauri.app/v1/guides/distribution/sign-linux + # uses: ./devops/linux-builder + + # - run: tar -czvf artifacts.tgz -C ./target/release/bundle . + + # - name: upload artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: ${{ matrix.platform.name }} + # path: artifacts.tgz + # if-no-files-found: error + + upload: - needs: [build_tauri, notorize_tauri] + needs: [notorize_tauri] runs-on: ubuntu-latest strategy: matrix: platform: - name: darwin+x86-64 id: mac_latest - - name: linux+x86-64 - id: linux + # - name: linux+x86-64 + # id: linux - name: darwin+aarch64 id: mac_m1 # - name: linux+aarch64 diff --git a/modules/desktop/electron-builder.config.json b/modules/desktop/electron-builder.config.json index d5eb53e..c0d0308 100644 --- a/modules/desktop/electron-builder.config.json +++ b/modules/desktop/electron-builder.config.json @@ -1,6 +1,6 @@ { "appId": "xyz.tea.gui", - "productName": "gui", + "productName": "tea", "asar": true, "directories": { "output": "dist" }, "files": ["src/electron.cjs", { "from": "build", "to": "" }]