Commit c86e084 1 parent dbd6f21 commit c86e084 Copy full SHA for c86e084
File tree 1 file changed +54
-0
lines changed
1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
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 : build and release
5
+
6
+ on :
7
+ push :
8
+ branches : [ "main" ]
9
+ pull_request :
10
+ branches : [ "main" ]
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : windows-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ - name : Setup .NET
19
+ uses : actions/setup-dotnet@v4
20
+ with :
21
+ dotnet-version : 8.0.x
22
+ - name : Restore dependencies
23
+ run : dotnet restore
24
+ - name : Build
25
+ run : dotnet build --no-restore --configuration Release
26
+ - name : Test
27
+ run : dotnet test --no-build --verbosity normal
28
+ - name : Package as zip
29
+ run : |
30
+ md release_package
31
+ copy bin\release\* release_package
32
+ zip -r rmdup_${{github.ref}}.zip release_package
33
+ - name : Create Release
34
+ id : create_release
35
+ uses : actions/create-release@v1
36
+ env :
37
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
38
+ with :
39
+ tag_name : ${{ github.ref }}
40
+ release_name : Release ${{ github.ref }}
41
+ body : |
42
+ Changes in this Release
43
+ - First Change
44
+ - Second Change
45
+ draft : true
46
+ prerelease : false
47
+ - name : Upload to Release
48
+ uses : actions/upload-release-asset@v4
49
+ with :
50
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
51
+ asset_path : rmdup_${{github.ref}}.zip
52
+ asset_name : rmdup_${{github.ref}}.zip
53
+ asset_content_type : application/zip
54
+
You can’t perform that action at this time.
0 commit comments