CI clean up
This commit is contained in:
		@ -14,15 +14,11 @@ on:
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  CUT_RELEASE_PR: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.title, 'Cut release v')) }}
 | 
			
		||||
  BUILD_RELEASE: true
 | 
			
		||||
  BUCKET_NAME: 'dl.kittycad.io'
 | 
			
		||||
  BUCKET_FOLDER: 'releases/modeling-app/test/electron'
 | 
			
		||||
  WEBSITE_DIR: 'dl.zoo.dev/releases/modeling-app/test/electron' 
 | 
			
		||||
  GOOGLE_CLOUD_PROJECT_ID: 'kittycadapi'
 | 
			
		||||
  BUILD_RELEASE: ${{ github.event_name == 'release' || github.event_name == 'schedule' || github.event_name == 'pull_request' && (contains(github.event.pull_request.title, 'Cut release v')) }}
 | 
			
		||||
 | 
			
		||||
# concurrency:
 | 
			
		||||
#   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
 | 
			
		||||
#   cancel-in-progress: true
 | 
			
		||||
concurrency:
 | 
			
		||||
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
 | 
			
		||||
  cancel-in-progress: true
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  prepare-files:
 | 
			
		||||
@ -85,6 +81,10 @@ jobs:
 | 
			
		||||
      CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
 | 
			
		||||
      CSC_KEYCHAIN: ${{ secrets.APPLE_SIGNING_IDENTITY }}
 | 
			
		||||
      CSC_FOR_PULL_REQUEST: true
 | 
			
		||||
      TAURI_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
 | 
			
		||||
      TAURI_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
 | 
			
		||||
      VERSION: ${{ github.event_name == 'schedule' && needs.prepare-files.outputs.version || format('v{0}', needs.prepare-files.outputs.version) }}
 | 
			
		||||
      VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
 | 
			
		||||
      WINDOWS_CERTIFICATE_THUMBPRINT: F4C9A52FF7BC26EE5E054946F6B11DEEA94C748D
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v4
 | 
			
		||||
@ -137,19 +137,13 @@ jobs:
 | 
			
		||||
        shell: cmd
 | 
			
		||||
 | 
			
		||||
      - name: Build the app
 | 
			
		||||
        # if: ${{ env.BUILD_RELEASE == 'false' }}
 | 
			
		||||
        run: yarn electron-builder --config --publish always
 | 
			
		||||
        run: yarn electron-builder --config ${{ env.BUILD_RELEASE && '--publish always' || '' }}
 | 
			
		||||
 | 
			
		||||
      - name: List artifacts in out/
 | 
			
		||||
        run: ls -R out
 | 
			
		||||
 | 
			
		||||
      - name: Prepare the tauri update bundles (macOS)
 | 
			
		||||
        if: ${{ matrix.os == 'macos-14' }}
 | 
			
		||||
        env:
 | 
			
		||||
          TAURI_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
 | 
			
		||||
          TAURI_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
 | 
			
		||||
          # VERSION: ${{ github.event_name == 'release' && format('v{0}', needs.prepare-files.outputs.version) || needs.prepare-files.outputs.version }}
 | 
			
		||||
          VERSION: ${{ format('v{0}', needs.prepare-files.outputs.version) }}
 | 
			
		||||
        if: ${{ env.BUILD_RELEASE && matrix.os == 'macos-14' }}
 | 
			
		||||
        run: |
 | 
			
		||||
          for ARCH in arm64 x64; do
 | 
			
		||||
            TAURI_DIR=out/tauri/$VERSION/macos
 | 
			
		||||
@ -163,13 +157,7 @@ jobs:
 | 
			
		||||
          ls -R out
 | 
			
		||||
 | 
			
		||||
      - name: Prepare the tauri update bundles (Windows)
 | 
			
		||||
        if: ${{ matrix.os == 'windows-2022' }}
 | 
			
		||||
        env:
 | 
			
		||||
          TAURI_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
 | 
			
		||||
          TAURI_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
 | 
			
		||||
          # VERSION: ${{ github.event_name == 'release' && format('v{0}', needs.prepare-files.outputs.version) || needs.prepare-files.outputs.version }}
 | 
			
		||||
          VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
 | 
			
		||||
          VERSION: ${{ format('v{0}', needs.prepare-files.outputs.version) }}
 | 
			
		||||
        if: ${{ env.BUILD_RELEASE && matrix.os == 'windows-2022' }}
 | 
			
		||||
        run: |
 | 
			
		||||
          $env:TAURI_DIR="out/tauri/${env:VERSION}/nsis"
 | 
			
		||||
          mkdir -p ${env:TAURI_DIR}
 | 
			
		||||
@ -195,23 +183,18 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-22.04
 | 
			
		||||
    permissions:
 | 
			
		||||
      contents: write
 | 
			
		||||
    # if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
 | 
			
		||||
    if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
 | 
			
		||||
    needs: [prepare-files, build-apps]
 | 
			
		||||
    env:
 | 
			
		||||
      VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
 | 
			
		||||
      # VERSION: ${{ github.event_name == 'release' && format('v{0}', needs.prepare-files.outputs.version) || needs.prepare-files.outputs.version }}
 | 
			
		||||
      VERSION: ${{ format('v{0}', needs.prepare-files.outputs.version) }}
 | 
			
		||||
      VERSION: ${{ github.event_name == 'schedule' && needs.prepare-files.outputs.version || format('v{0}', needs.prepare-files.outputs.version) }}
 | 
			
		||||
      PUB_DATE: ${{ github.event_name == 'release' && github.event.release.created_at || github.event.repository.updated_at }}
 | 
			
		||||
      # NOTES: ${{ github.event_name == 'release' && github.event.release.body || format('Nightly build, commit {0}', github.sha) }}
 | 
			
		||||
      NOTES: ${{ format('Electron build, commit {0}', github.sha) }}
 | 
			
		||||
      # BUCKET_DIR: ${{ github.event_name == 'release' && 'dl.kittycad.io/releases/modeling-app' || 'dl.kittycad.io/releases/modeling-app/nightly' }}
 | 
			
		||||
      BUCKET_DIR: ${{ 'dl.kittycad.io/releases/modeling-app/test/electron-builder' }}
 | 
			
		||||
      NOTES: ${{ github.event_name == 'release' && github.event.release.body || format('Non-release build, commit {0}', github.sha) }}
 | 
			
		||||
      BUCKET_DIR: ${{ github.event_name == 'schedule' && 'dl.kittycad.io/releases/modeling-app/nightly' || 'dl.kittycad.io/releases/modeling-app/test/electron-builder' }}
 | 
			
		||||
      BUCKET_DIR_TAURI: ${{ 'dl.kittycad.io/releases/modeling-app/test/electron-builder/tauri' }}
 | 
			
		||||
      # WEBSITE_DIR: ${{ github.event_name == 'release' && 'dl.zoo.dev/releases/modeling-app' || 'dl.zoo.dev/releases/modeling-app/nightly' }}
 | 
			
		||||
      WEBSITE_DIR: ${{ 'dl.zoo.dev/releases/modeling-app/test/electron-builder' }}
 | 
			
		||||
      WEBSITE_DIR: ${{ github.event_name == 'schedule' && 'dl.zoo.dev/releases/modeling-app/nightly' || 'dl.zoo.dev/releases/modeling-app/test/electron-builder' }}
 | 
			
		||||
      WEBSITE_DIR_TAURI: ${{ 'dl.zoo.dev/releases/modeling-app/test/electron-builder/tauri' }}
 | 
			
		||||
      # URL_CODED_NAME: ${{ github.event_name == 'schedule' && 'Zoo%20Modeling%20App%20%28Nightly%29' || 'Zoo%20Modeling%20App' }}
 | 
			
		||||
      URL_CODED_NAME: ${{ 'Zoo%20Modeling%20App' }}
 | 
			
		||||
      URL_CODED_NAME: ${{ github.event_name == 'schedule' && 'Zoo%20Modeling%20App%20%28Nightly%29' || 'Zoo%20Modeling%20App' }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
@ -353,7 +336,7 @@ jobs:
 | 
			
		||||
        if: ${{ github.event_name == 'release' }}
 | 
			
		||||
        uses: softprops/action-gh-release@v2
 | 
			
		||||
        with:
 | 
			
		||||
          files: 'artifact/*/Zoo*'
 | 
			
		||||
          files: 'out/Zoo*'
 | 
			
		||||
 | 
			
		||||
      # TODO: Add GitHub publisher
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user