From 92149a93c9cb1028dc2d04fc536a37cde103ee5b Mon Sep 17 00:00:00 2001 From: zetaloop Date: Thu, 4 Jan 2024 23:34:03 +0800 Subject: [PATCH 1/2] Custom CI Build Manually trigger build, save files. Windows x64 only. Disable tests. Disable signing. --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ce2e88add..f4f4d693b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,24 @@ name: CI on: - push: - branches: - - development - pull_request: + # push: + # branches: + # - development + # pull_request: + workflow_dispatch: + inputs: + upload-artifacts: + default: true + required: false + type: boolean + environment: + default: beta + type: string + required: true + sign: + type: boolean + default: false + required: false workflow_call: inputs: repository: @@ -70,11 +84,13 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13-xl-arm64, windows-2019] - arch: [x64, arm64] + # os: [macos-13-xl-arm64, windows-2019] + # arch: [x64, arm64] + os: [windows-2019] + arch: [x64] include: - - os: macos-13-xl-arm64 - friendlyName: macOS + # - os: macos-13-xl-arm64 + # friendlyName: macOS - os: windows-2019 friendlyName: Windows timeout-minutes: 60 @@ -119,17 +135,17 @@ jobs: KEY_PASSWORD: ${{ secrets.APPLE_APPLICATION_CERT_PASSWORD }} npm_config_arch: ${{ matrix.arch }} TARGET_ARCH: ${{ matrix.arch }} - - name: Prepare testing environment - if: matrix.arch == 'x64' - run: yarn test:setup - env: - npm_config_arch: ${{ matrix.arch }} - - name: Run unit tests - if: matrix.arch == 'x64' - run: yarn test:unit - - name: Run script tests - if: matrix.arch == 'x64' - run: yarn test:script + # - name: Prepare testing environment + # if: matrix.arch == 'x64' + # run: yarn test:setup + # env: + # npm_config_arch: ${{ matrix.arch }} + # - name: Run unit tests + # if: matrix.arch == 'x64' + # run: yarn test:unit + # - name: Run script tests + # if: matrix.arch == 'x64' + # run: yarn test:script - name: Install Azure Code Signing Client if: ${{ runner.os == 'Windows' && inputs.sign }} run: | @@ -155,6 +171,6 @@ jobs: dist/GitHub Desktop-${{matrix.arch}}.zip dist/GitHubDesktop-*.nupkg dist/GitHubDesktopSetup-${{matrix.arch}}.exe - dist/GitHubDesktopSetup-${{matrix.arch}}.msi + # dist/GitHubDesktopSetup-${{matrix.arch}}.msi dist/bundle-size.json if-no-files-found: error From 86dc9ebc1b051ce368eb6c815bc23f01b3a251f6 Mon Sep 17 00:00:00 2001 From: zetaloop Date: Thu, 4 Jan 2024 23:36:23 +0800 Subject: [PATCH 2/2] CI Disable Signing No key. Enabling signing will cause building fail. --- script/dist-info.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/dist-info.ts b/script/dist-info.ts index e2ae688d55..a7c4d55c32 100644 --- a/script/dist-info.ts +++ b/script/dist-info.ts @@ -106,8 +106,8 @@ export function getBundleSizes() { mainBundleSize: Fs.statSync(Path.join(outPath, 'main.js')).size, } } -export const isPublishable = () => - ['production', 'beta', 'test'].includes(getChannel()) +export const isPublishable = () => false // Desktop-CN: I dont have a key, so never sign. +// ['production', 'beta', 'test'].includes(getChannel()) export const getChannel = () => process.env.RELEASE_CHANNEL ?? process.env.NODE_ENV ?? 'development'