From 297e0c628f26be599ced25c822a4bc46abb00e56 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Sat, 20 Jul 2024 15:06:29 -0700 Subject: [PATCH] First pass at getting CI/CD going. --- .github/workflows/build.yml | 27 +++++++++++++++++++ .github/workflows/publish.yml | 27 +++++++++++++++++++ ...ystem.Net.WebSockets.Client.Managed.csproj | 10 +++---- 3 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4aa8f90 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Build Library + +on: + push: + paths-ignore: + - '**/*.md' + branches: + - master + pull_request: + branches: + - master + paths-ignore: + - '**/*.md' + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Setup .NET 8 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..5e48b71 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish Library + +# When a release is published +on: + release: + types: [published] +jobs: + publish: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Get version + run: | + echo "VERSION=${{ github.event.release.tag_name }}" >> $env:GITHUB_ENV + echo "Building with ${{ env.VERSION }}" + - name: Setup .NET 7 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore -p:Version=${{ env.VERSION }} + - name: Pack + run: dotnet pack System.Net.WebSockets.Client.Managed --output nupkgs --configuration Release -p:Version=${{ env.VERSION }} + - name: Nuget Publish + run: dotnet nuget push nupkgs\*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json \ No newline at end of file diff --git a/System.Net.WebSockets.Client.Managed/System.Net.WebSockets.Client.Managed.csproj b/System.Net.WebSockets.Client.Managed/System.Net.WebSockets.Client.Managed.csproj index e6509fa..2d28b4f 100644 --- a/System.Net.WebSockets.Client.Managed/System.Net.WebSockets.Client.Managed.csproj +++ b/System.Net.WebSockets.Client.Managed/System.Net.WebSockets.Client.Managed.csproj @@ -5,11 +5,11 @@ true true 1.0.1 - Microsoft, Matthew Little - Microsoft, Pingman Tools - https://github.com/PingmanTools/System.Net.WebSockets.Client.Managed/blob/master/LICENSE - https://github.com/PingmanTools/System.Net.WebSockets.Client.Managed/ - https://github.com/PingmanTools/System.Net.WebSockets.Client.Managed/ + Microsoft, Matthew Little, Yellow Dog Man Studios s.r.o + Microsoft, Pingman Tools, Yellow Dog Man Studios s.r.o + https://github.com/Yellow-Dog-Man/System.Net.WebSockets.Client.Managed/blob/master/LICENSE + https://github.com/Yellow-Dog-Man/System.Net.WebSockets.Client.Managed/ + https://github.com/Yellow-Dog-Man/System.Net.WebSockets.Client.Managed/ websockets websocket-client websocketsharp clientwebsocket websocket4net Microsoft's managed implementation of System.Net.WebSockets.ClientWebSocket tweaked for use on Windows 7 and .NET 4.5 latest