diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..275a9005 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,44 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet +{ + "name": "C# (.NET)", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0", + "features": { + "ghcr.io/devcontainers/features/dotnet:2": {} + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [5000, 5001], + // "portsAttributes": { + // "5001": { + // "protocol": "https" + // } + // } + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "dotnet restore", + + // Configure tool-specific properties. + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "streetsidesoftware.code-spell-checker", + "github.vscode-github-actions", + "davidanson.vscode-markdownlint", + "mhutchie.git-graph", + "ms-dotnettools.csdevkit" + ] + } + } + + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.github/workflows/build_dotnet.yml b/.github/workflows/build_dotnet.yml new file mode 100644 index 00000000..3120c944 --- /dev/null +++ b/.github/workflows/build_dotnet.yml @@ -0,0 +1,48 @@ +name: .NET Core Desktop + +on: + # push: + # branches: [ "Development" ] + + pull_request: + branches: [ "Development" ] + types: [opened, synchronize] + +env: + Solution: src/LogExpert.sln + Test_Project: src/LogExpert.Tests/LogExpert.Tests.csproj + +jobs: + build: + permissions: + contents: read + + strategy: + fail-fast: false + matrix: + configuration: [Debug, Release] + + runs-on: windows-latest + name: Build Application - ${{ matrix.configuration }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - name: Build application + run: | + dotnet build ${{ env.Solution }} --nologo -v quiet -c ${{ matrix.configuration }} + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: Snapshot-${{ matrix.configuration }} + path: bin/${{ matrix.configuration }} + retention-days: 7