Skip to content

Commit c44d9f8

Browse files
authored
Create dotnet.yml
1 parent 69d8e39 commit c44d9f8

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/dotnet.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: .NET
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
name: Build and upload artifact.
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v4
21+
with:
22+
dotnet-version: 8.0.x
23+
- name: Restore dependencies
24+
run: dotnet restore
25+
- name: Build
26+
run: dotnet build --no-restore
27+
- name: Upload artifact
28+
uses: actions/[email protected]
29+
with:
30+
name: cstojs-artifact
31+
path: /bin/Debug/net8.0/
32+
test:
33+
needs: build
34+
name: Run tests.
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- uses: actions/[email protected]
39+
- name: Download a Build Artifact
40+
with:
41+
name: cstojs-artifact
42+
path: artifact
43+
- name: Display structure of downloaded files
44+
run: ls -R artifact
45+

0 commit comments

Comments
 (0)