Build #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
workflow_dispatch: | |
inputs: | |
build-version: | |
description: 'Electron version to build' | |
required: true | |
default: '30' | |
type: choice | |
options: | |
- 29 | |
- 30 | |
- 31 | |
- 32 | |
- 33 | |
# test-version: | |
# description: 'Electron version to test build' | |
# required: true | |
# default: '31.6.0' | |
# type: choice | |
# options: | |
# - 29.4.6 | |
# - 30.5.1 | |
# - 31.6.0 | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # required to setup CSC | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_NOLOGO: 1 | |
jobs: | |
build: | |
runs-on: windows-2022 | |
outputs: | |
test-version: ${{ steps.electron-test-version.outputs.test-version }} | |
strategy: | |
fail-fast: true | |
name: build electron-${{ inputs.build-version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup env | |
uses: ./.github/actions/setup-env | |
with: | |
electron: '${{ inputs.build-version }}.0.0' | |
os: ${{ runner.os }} | |
- name: Get latest Electron version for ${{ inputs.build-version }}.0.0 | |
id: electron-test-version | |
shell: bash | |
run: | | |
node tools/getVersion.js ${{ inputs.build-version }} | |
echo "test-version=$(cat electron.txt)" >> $GITHUB_OUTPUT | |
- name: install node-gyp | |
run: npm i -g node-gyp | |
- name: Create release folder | |
run: | | |
mkdir "release\ia32\${{ inputs.build-version }}.0.0" | |
mkdir "release\x64\${{ inputs.build-version }}.0.0" | |
mkdir "release\arm64\${{ inputs.build-version }}.0.0" | |
- name: Cache node-gyp | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-gyp | |
with: | |
path: ~\AppData\Local\node-gyp\Cache | |
key: '${{ inputs.build-version }}.0.0' | |
- name: Build ia32 | |
timeout-minutes: 30 | |
uses: ./.github/actions/build | |
with: | |
electron: ${{ inputs.build-version }} | |
arch: 'ia32' | |
- name: Build x64 | |
timeout-minutes: 30 | |
uses: ./.github/actions/build | |
with: | |
electron: ${{ inputs.build-version }} | |
arch: 'x64' | |
- name: Build arm64 | |
timeout-minutes: 30 | |
uses: ./.github/actions/build | |
with: | |
electron: ${{ inputs.build-version }} | |
arch: 'arm64' | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: success() | |
with: | |
name: electron-edge-js-${{ inputs.build-version }}.0.0 | |
path: | | |
release | |
test: | |
runs-on: ${{ matrix.os }} | |
needs: build | |
strategy: | |
matrix: | |
os: [windows-2022] | |
# fail-fast: false | |
name: test ${{ matrix.os }}-v${{ needs.build.outputs.test-version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Test build | |
uses: ./.github/actions/test-build | |
with: | |
electron: ${{ needs.build.outputs.test-version }} | |
os: ${{ matrix.os }} | |