Skip to content

Commit

Permalink
Merge pull request #1 from zetaloop/ci-playground
Browse files Browse the repository at this point in the history
Custom CI Build
  • Loading branch information
zetaloop authored Jan 4, 2024
2 parents 0d35d23 + 86dc9eb commit 62aa5fb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
56 changes: 36 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -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
4 changes: 2 additions & 2 deletions script/dist-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 62aa5fb

Please sign in to comment.