diff --git a/.github/workflows/build b/.github/workflows/build index 8b13789..4d0a75c 100644 --- a/.github/workflows/build +++ b/.github/workflows/build @@ -1 +1,47 @@ +name: Build Bimix +on: + push: + branches: + - main + +jobs: + build: + name: Build WebAPI and WebUI + runs-on: ubuntu-latest + + env: + DOTNET_VERSION: '8.0.x' + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Restore dependencies + run: dotnet restore + + - name: Build solution + run: dotnet build --configuration Release --no-restore + + - name: Publish WebAPI + run: | + dotnet publish Bimix.API/Bimix.API.csproj \ + --configuration Release \ + --output ./publish/Bimix-WebAPI + + - name: Publish Web (Blazor Server) + run: | + dotnet publish Bimix.UI.Web/Bimix.UI.Web.csproj \ + --configuration Release \ + --output ./publish/Bimix-Web + + - name: Upload publish artifact + uses: actions/upload-artifact@v4 + with: + name: bimix-artifacts + path: ./publish