diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml new file mode 100644 index 0000000..891c611 --- /dev/null +++ b/.github/workflows/dotnet-desktop.yml @@ -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