Skip to content

Commit

Permalink
updating GitHub pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Sep 18, 2024
1 parent 127e1bf commit 89c9329
Showing 1 changed file with 32 additions and 19 deletions.
51 changes: 32 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ on:
- 29.0.0
- 30.0.0
- 31.0.0
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
# 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
Expand Down Expand Up @@ -52,11 +52,24 @@ jobs:
- name: install node-gyp
run: npm i -g node-gyp

- uses: agracio/[email protected]
id: electron_version
with:
value: "${{ inputs.build-version }}"
length_from_start: 2
- name: Resolve Electron version for test
id: electron-test-version
shell: bash
run: |
if [ ${{ inputs.build-version }} == '29.0.0' ]; then
echo "test-version=29.4.6" >> $GITHUB_OUTPUT
elif [ ${{ inputs.build-version }} == '30.0.0' ]; then
echo "test-version=30.5.1" >> $GITHUB_OUTPUT
elif [ ${{ inputs.build-version }} == '31.0.0' ]; then
echo "test-version=31.6.0" >> $GITHUB_OUTPUT
else
core.setFailed("Unable to resolve Electron version for testing")
fi
- name: Test resolved electron version
run: |
echo "the secret number is ${{ steps.electron-test-version.outputs.test-version }}"
exit 1
- name: Create release folder
run: |
Expand Down Expand Up @@ -111,22 +124,22 @@ jobs:
os: [windows-2022]
# fail-fast: false

name: test ${{ matrix.os }}-v${{ inputs.test-version }}
name: test ${{ matrix.os }}-v${{ needs.build.outputs.test-version }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup env
uses: ./.github/actions/setup-env
with:
electron: ${{ inputs.test-version }}
electron: ${{ needs.build.outputs.test-version }}
os: ${{ matrix.os }}
replace-version: true

- uses: agracio/[email protected]
id: electron_version
with:
value: ${{ inputs.test-version }}
value: ${{ needs.build.outputs.test-version }}
length_from_start: 2

- name: Create release folder
Expand All @@ -151,12 +164,12 @@ jobs:
timeout-minutes: 10
uses: ./.github/actions/test-windows
with:
electron: ${{ inputs.test-version }}
electron: ${{ needs.build.outputs.test-version }}

- name: Test report
uses: ./.github/actions/create-test-report
with:
electron: ${{ inputs.test-version }}
electron: ${{ needs.build.outputs.test-version }}
os: ${{ matrix.os }}
name: 'build-tests'

Expand Down

0 comments on commit 89c9329

Please sign in to comment.