diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f7f6a04 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: .NET Build + +on: + workflow_dispatch: + +jobs: + build: + name: Build on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + include: + - os: ubuntu-latest + mono-version: 'latest' + runtime: 'linux-x64' + - os: windows-latest + vs-version: 'latest' + runtime: 'win-x64' + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.x' + + - name: Restore dependencies + run: dotnet restore + + - name: Build self-contained application + run: dotnet publish --no-restore --configuration Release --self-contained -r ${{ matrix.runtime }} /p:PublishSingleFile=false + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: self-contained-${{ matrix.runtime }} + path: | + **/bin/Release/net8.0/${{ matrix.runtime }}/publish/