Skip to content

Commit dd05c4b

Browse files
committed
Add a workflow (for testing)
1 parent 2950a59 commit dd05c4b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: .NET Release Workflow
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v2
18+
with:
19+
dotnet-version: '8.0' # Specify your .NET version here
20+
21+
- name: Restore dependencies
22+
run: dotnet restore
23+
24+
- name: Build the project
25+
run: dotnet build --configuration Release
26+
27+
- name: Run tests
28+
run: dotnet test
29+
30+
- name: Publish the project
31+
run: dotnet publish --configuration Release --output ./publish
32+
33+
- name: Create Release
34+
uses: softprops/action-gh-release@v1
35+
36+
with:
37+
files: ./publish/**/*
38+
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)