diff --git a/.github/workflows/shared_library_nuget.yml b/.github/workflows/shared_library_nuget.yml new file mode 100644 index 00000000..b5b61999 --- /dev/null +++ b/.github/workflows/shared_library_nuget.yml @@ -0,0 +1,40 @@ +name: Build and Pack SharedLibraryCore Nuget + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +jobs: + build_pack: + + runs-on: ubuntu-latest + + env: + buildPlatform: 'Any CPU' + outputFolder: '${{github.workspace}}/Publish/${{env.buildConfiguration}}' + releaseType: 'verified' + buildConfiguration: 'Release' + isPreRelease: 'false' + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build Data + run: dotnet build **/Data.csproj -c ${{env.buildConfiguration}} --no-restore + - name: Build SLC + run: dotnet build **/SharedLibraryCore.csproj -c ${{env.buildConfiguration}} /p:Version=${{github.run_number}} --no-restore + - name: Pack SLC + run: dotnet pack **/SharedLibraryCore.csproj -c ${{env.buildConfiguration}} --version-suffix ${{github.run_number}} + + - name: Publish nuget package artifact + uses: actions/upload-artifact@v3 + with: + name: SharedLibraryCore.${{github.run_number}}.nupkg + path: '**/RaidMax.IW4MAdmin.SharedLibraryCore.${{github.run_number}}.nupkg'