-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from Osiris-Team/main
build exe (portable zip) via github workflow
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build and Attach to Release | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
permissions: write-all | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up MSBuild | ||
uses: microsoft/setup-msbuild@v1 | ||
with: | ||
msbuild-version: '16.0' | ||
|
||
- name: Restore NuGet packages | ||
run: nuget restore p2pconn.sln | ||
|
||
- name: Build | ||
run: msbuild p2pconn.sln /p:Configuration=Release | ||
|
||
- name: Zip files in p2pconn/bin/Release | ||
run: | | ||
Compress-Archive -Path ./p2pconn/bin/Release/* -DestinationPath ./p2pconn/bin/Release/p2p-portable.zip | ||
- name: List contents of p2pconn/bin/Release | ||
run: ls -R ./p2pconn/bin/Release | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: p2pconn/bin/Release/p2p-portable.zip |