Make GH Actions use matrix for runs-on

This commit is contained in:
Margen67 2022-02-16 18:37:15 -08:00 committed by Gliniak
parent 8698062213
commit 81ca27575c

View file

@ -23,11 +23,18 @@ on:
jobs: jobs:
build-windows: build-windows:
runs-on: windows-2019 runs-on: ${{ matrix.runs-on }}
env: env:
POWERSHELL_TELEMETRY_OPTOUT: 1 POWERSHELL_TELEMETRY_OPTOUT: 1
strategy: strategy:
fail-fast: false fail-fast: false
matrix:
runs-on: [windows-2019, windows-latest]
include:
- runs-on: windows-latest
vsver: VS2022
- runs-on: windows-2019
vsver: VS2019
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
@ -51,11 +58,12 @@ jobs:
- name: Upload xenia artifacts - name: Upload xenia artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: xenia_canary name: xenia_canary_${{ matrix.vsver }}
path: artifacts\xenia_canary path: artifacts\xenia_canary
if-no-files-found: error if-no-files-found: error
- name: Create release - name: Create release
if: | if: |
matrix.runs-on == 'windows-2019' &&
github.repository == 'xenia-canary/xenia-canary' && github.repository == 'xenia-canary/xenia-canary' &&
github.event.action != 'pull_request' && github.event.action != 'pull_request' &&
contains(github.ref, 'refs/heads/canary') contains(github.ref, 'refs/heads/canary')