Skip to content

Commit

Permalink
First pass at getting CI/CD going.
Browse files Browse the repository at this point in the history
  • Loading branch information
Geenz committed Jul 20, 2024
1 parent 772e040 commit 297e0c6
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.0.1</Version>
<Authors>Microsoft, Matthew Little</Authors>
<Company>Microsoft, Pingman Tools</Company>
<PackageLicenseUrl>https://github.com/PingmanTools/System.Net.WebSockets.Client.Managed/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/PingmanTools/System.Net.WebSockets.Client.Managed/</PackageProjectUrl>
<RepositoryUrl>https://github.com/PingmanTools/System.Net.WebSockets.Client.Managed/</RepositoryUrl>
<Authors>Microsoft, Matthew Little, Yellow Dog Man Studios s.r.o</Authors>
<Company>Microsoft, Pingman Tools, Yellow Dog Man Studios s.r.o</Company>
<PackageLicenseUrl>https://github.com/Yellow-Dog-Man/System.Net.WebSockets.Client.Managed/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/Yellow-Dog-Man/System.Net.WebSockets.Client.Managed/</PackageProjectUrl>
<RepositoryUrl>https://github.com/Yellow-Dog-Man/System.Net.WebSockets.Client.Managed/</RepositoryUrl>
<PackageTags>websockets websocket-client websocketsharp clientwebsocket websocket4net</PackageTags>
<Description>Microsoft's managed implementation of System.Net.WebSockets.ClientWebSocket tweaked for use on Windows 7 and .NET 4.5</Description>
<LangVersion>latest</LangVersion>
Expand Down

0 comments on commit 297e0c6

Please sign in to comment.