From e876fef15f4c004a313649f4c1ee2ed336607da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerard=20Gasc=C3=B3n?= <52170489+GerardGascon@users.noreply.github.com> Date: Sun, 30 Jun 2024 00:13:21 +0200 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/build.yml 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/