Create SECURITY.md #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Debug Test and Publish Nuget Package | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
env: | |
Solution_Name: Xcaciv.Loader.sln | |
Nuget_Project_Path: src\Xcaciv.Loader\Xcaciv.Loader.csproj | |
Nuget_Config_Path: NuGet.config | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore $env:Solution_Name | |
- name: Debug Build | |
run: dotnet build $env:Solution_Name --no-restore --configuration Debug | |
- name: Test with dotnet | |
run: dotnet test $env:Solution_Name --no-build --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" | |
- name: Upload dotnet test results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dotnet-results-${{ matrix.dotnet-version }} | |
path: TestResults-${{ matrix.dotnet-version }} | |
- name: Release Build | |
run: | | |
dotnet build $env:Nuget_Project_Path --no-restore --configuration Release | |
- name: Nuget Package | |
run: | | |
dotnet pack $env:Nuget_Project_Path --no-build --configuration Release | |
- name: Configure Nuget Source | |
run: | | |
dotnet nuget add source "https://nuget.pkg.github.com/xcaciv/index.json" -n "github" -u xcaciv -p ${{ secrets.NUGET_PAT }} --store-password-in-clear-text | |
- name: Nuget Push | |
run: | | |
dotnet nuget push **\*.nupkg -k ${{ secrets.NUGET_PAT }} -s "github" --skip-duplicate | |
- name: Cleanup | |
if: always() | |
continue-on-error: true | |
run: | | |
dotnet nuget remove source github |