Skip to content

Commit aa49d96

Browse files
Merge pull request #58 from Osiris-Team/main
build exe (portable zip) via github workflow
2 parents cfbe510 + bcf2552 commit aa49d96

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/dotnet-desktop.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and Attach to Release
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
build:
10+
permissions: write-all
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
17+
- name: Set up MSBuild
18+
uses: microsoft/setup-msbuild@v1
19+
with:
20+
msbuild-version: '16.0'
21+
22+
- name: Restore NuGet packages
23+
run: nuget restore p2pconn.sln
24+
25+
- name: Build
26+
run: msbuild p2pconn.sln /p:Configuration=Release
27+
28+
- name: Zip files in p2pconn/bin/Release
29+
run: |
30+
Compress-Archive -Path ./p2pconn/bin/Release/* -DestinationPath ./p2pconn/bin/Release/p2p-portable.zip
31+
32+
- name: List contents of p2pconn/bin/Release
33+
run: ls -R ./p2pconn/bin/Release
34+
35+
- name: Release
36+
uses: softprops/action-gh-release@v1
37+
with:
38+
files: p2pconn/bin/Release/p2p-portable.zip

0 commit comments

Comments
 (0)