Skip to content

Fix configuration for release build #81

Fix configuration for release build

Fix configuration for release build #81

Workflow file for this run

name: Build parser and validator
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
container: mono:latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Restore cache for ~/.nuget/packages
uses: actions/cache@v1
with:
path: ~/.nuget/packages
key: nuget-packref-modules-${{ hashFiles('**/*.csproj') }}
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7'
- name: Restore, build, and test
run: |
msbuild -r -p:configuration=Debug -p:TargetFramework=net48
dotnet build -f net7.0
- name: Smoke test the validator outside the build dir
run: |
cp _build/KSPMMCfgValidator/Debug/bin/net48/Repack/KSPMMCfgValidator.exe .
chmod a+x KSPMMCfgValidator.exe
mono ./KSPMMCfgValidator.exe
- name: Upload parser nupkg artifact
uses: actions/upload-artifact@v2
with:
name: KSPMMCfgParser.nupkg
path: _build/KSPMMCfgParser/Debug/bin/KSPMMCfgParser.*.nupkg
retention-days: 7
if: github.event_name == 'pull_request'
- name: Upload validator exe artifact
uses: actions/upload-artifact@v2
with:
name: KSPMMCfgValidator.exe
path: _build/KSPMMCfgValidator/Debug/bin/net48/Repack/KSPMMCfgValidator.exe
retention-days: 7
if: github.event_name == 'pull_request'