Skip to content

switch version fetching #2

switch version fetching

switch version fetching #2

name: Build EVIL front-end with runtime
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
runtime-identifier: [win-x64, linux-x64]
runs-on: windows-latest
env:
Solution_Name: EVIL.sln
Test_Project_Path: VirtualMachine\Tests\Ceres.RuntimeTests\Ceres.RuntimeTests.csproj
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Execute unit tests
run: dotnet test
- name: Publish to directory
run: dotnet publish FrontEnd/EVIL.evil/EVIL.evil.csproj -c $env:Configuration -r $env:RuntimeIdentifier --no-self-contained -p:PublishSingleFile=true
env:
Configuration: ${{ matrix.configuration }}
RuntimeIdentifier: ${{ matrix.runtime-identifier }}
- name: Fetch front-end version
id: package_version
uses: MWin10/get-csproj-version-fork@latest
with:
file: FrontEnd/EVIL.evil/EVIL.evil.csproj
- name: Pack artifact
uses: actions/[email protected]
with:
name: evil-${{ steps.package_version.outputs.version }}_${{ matrix.runtime-identifier }}
path: FrontEnd/EVIL.evil/bin/${{ matrix.configuration }}/net7.0/${{ matrix.runtime-identifier }}/publish
if-no-files-found: error
retention-days: 90