Skip to content

Commit f09f8e6

Browse files
authored
Merge pull request #452 from stprograms/build_action
Added snapshot builds on Pull request
2 parents 9cd32de + 65376a4 commit f09f8e6

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
3+
{
4+
"name": "C# (.NET)",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0",
7+
"features": {
8+
"ghcr.io/devcontainers/features/dotnet:2": {}
9+
},
10+
11+
// Features to add to the dev container. More info: https://containers.dev/features.
12+
// "features": {},
13+
14+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
15+
// "forwardPorts": [5000, 5001],
16+
// "portsAttributes": {
17+
// "5001": {
18+
// "protocol": "https"
19+
// }
20+
// }
21+
22+
// Use 'postCreateCommand' to run commands after the container is created.
23+
// "postCreateCommand": "dotnet restore",
24+
25+
// Configure tool-specific properties.
26+
// Configure tool-specific properties.
27+
"customizations": {
28+
// Configure properties specific to VS Code.
29+
"vscode": {
30+
// Add the IDs of extensions you want installed when the container is created.
31+
"extensions": [
32+
"streetsidesoftware.code-spell-checker",
33+
"github.vscode-github-actions",
34+
"davidanson.vscode-markdownlint",
35+
"mhutchie.git-graph",
36+
"ms-dotnettools.csdevkit"
37+
]
38+
}
39+
}
40+
41+
42+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
43+
// "remoteUser": "root"
44+
}

.github/workflows/build_dotnet.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: .NET Core Desktop
2+
3+
on:
4+
# push:
5+
# branches: [ "Development" ]
6+
7+
pull_request:
8+
branches: [ "Development" ]
9+
types: [opened, synchronize]
10+
11+
env:
12+
Solution: src/LogExpert.sln
13+
Test_Project: src/LogExpert.Tests/LogExpert.Tests.csproj
14+
15+
jobs:
16+
build:
17+
permissions:
18+
contents: read
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
configuration: [Debug, Release]
24+
25+
runs-on: windows-latest
26+
name: Build Application - ${{ matrix.configuration }}
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Install .NET Core
35+
uses: actions/setup-dotnet@v4
36+
with:
37+
dotnet-version: 9.0.x
38+
39+
- name: Build application
40+
run: |
41+
dotnet build ${{ env.Solution }} --nologo -v quiet -c ${{ matrix.configuration }}
42+
43+
- name: Upload artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: Snapshot-${{ matrix.configuration }}
47+
path: bin/${{ matrix.configuration }}
48+
retention-days: 7

0 commit comments

Comments
 (0)