Skip to content

v2.14.3.1

v2.14.3.1 #307

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Development artifact
concurrency:
group: build
cancel-in-progress: false
on:
push:
branches:
- 'main'
- 'feat/*'
tags-ignore:
- '**'
pull_request:
branches: [ "main" ]
env:
DOTNET_VERSION: '8.0.204'
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
NEXUSMOD_API_KEY: ${{ secrets.NEXUSMOD_API_KEY }}
NEXUSMOD_SESSION_COOKIE: ${{ secrets.NEXUSMOD_SESSION_COOKIE }}
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Dotnet cache
id: cache-dotnet-core
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.dotnet
key: ${{ runner.os }}-dotnet
restore-keys: |
${{ runner.os }}-dotnet
- name: NuGet cache
id: cache-nuget
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET
if: ${{ steps.cache-dotnet-core.outputs.cache-hit != 'true' }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore packages
if: ${{ steps.cache-nuget.outputs.cache-hit != 'true' }}
run: nuget restore ./WitchyBND.sln -LockedMode
- name: Build
run: dotnet build -c Release --no-restore ./WitchyTests/WitchyTests.csproj # Builds WitchyBND which builds Shell
- name: Install test runner
run: nuget install NUnit.ConsoleRunner -Version 3.17.0 -DirectDownload -OutputDirectory .
- name: Run unit tests
run: ./NUnit.ConsoleRunner.3.17.0/tools/nunit3-console.exe ./WitchyTests/bin/Release/net8.0-windows/WitchyTests.dll --where "cat != SkipOnGitHubAction"
- name: Publish application
run: |
cd WitchyBND
dotnet publish -c Release --no-restore
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: 'WitchyBND-SHA${{ github.sha }}'
path: './bin/publish'
nexus:
runs-on: windows-latest
steps:
- name: Setup mod uploader
run: dotnet tool install -g Digitalroot.ModUploader
- name: Check mod uploader
run: drmu nx check