Package BitNetSharp.App as a .NET tool and BitNetSharp.Core as a NuGet artifact in CI #9
Workflow file for this run
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| global-json-file: global.json | |
| - name: Restore | |
| run: dotnet restore BitNet-b1.58-Sharp.slnx | |
| - name: Build | |
| run: dotnet build BitNet-b1.58-Sharp.slnx --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test BitNet-b1.58-Sharp.slnx --configuration Release --no-build --no-restore | |
| - name: Pack BitNetSharp.Core | |
| run: dotnet pack "${{ github.workspace }}/src/BitNetSharp.Core/BitNetSharp.Core.csproj" --configuration Release --no-build --no-restore --output "${{ github.workspace }}/artifacts/packages/core" | |
| - name: Pack BitNetSharp.App dotnet tool | |
| run: dotnet pack "${{ github.workspace }}/src/BitNetSharp.App/BitNetSharp.App.csproj" --configuration Release --no-build --no-restore --output "${{ github.workspace }}/artifacts/packages/tool" | |
| - name: Upload BitNetSharp.Core package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BitNetSharp.Core-nuget | |
| path: ${{ github.workspace }}/artifacts/packages/core/*.nupkg | |
| if-no-files-found: error | |
| - name: Upload BitNetSharp.App tool package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BitNetSharp.App-dotnet-tool | |
| path: ${{ github.workspace }}/artifacts/packages/tool/*.nupkg | |
| if-no-files-found: error |