-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (34 loc) · 973 Bytes
/
build-dotnet-code.yml
File metadata and controls
34 lines (34 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: .NET
on:
push:
paths:
- "**.cs"
pull_request:
paths:
- "**.cs"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code into the directory
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: 6.0.x
include-prerelease: true
- name: Run the code
run: |
mkdir -p C#/Build/
mv C#/C#.csproj C#/Build/
ALL_FILES_IN_DIRECTORY=$(find C#/ -type f -name "*.cs")
for CURRENT_FILE_IN_DIRECTORY in ${ALL_FILES_IN_DIRECTORY}; do
ALL_FILES_LIST[${ADD_CONTENT}]=${CURRENT_FILE_IN_DIRECTORY}
ADD_CONTENT=$(("${ADD_CONTENT}" + 1))
done
for FILE_LIST in "${ALL_FILES_LIST[@]}"; do
echo ${FILE_LIST}
mv ${FILE_LIST} C#/Build/
dotnet run --project C#/Build/
rm -f **C#/Build/*.cs
done