-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1166c1a
commit ca26010
Showing
13 changed files
with
93 additions
and
14 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,37 @@ | ||
name: NuGet Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore ./src | ||
|
||
- name: Build | ||
run: dotnet build ./src --no-restore --configuration Release | ||
|
||
- name: Pack NuGet Package(s) | ||
run: dotnet pack ./src --no-restore --no-build --configuration Release --output ./nuget-packages | ||
|
||
- name: Upload Build Artifact(s) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nuget-packages | ||
path: ./nuget-packages | ||
|
||
- name: Push NuGet Package(s) | ||
run: dotnet nuget push ./nuget-packages/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate | ||
env: | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} |
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
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,15 @@ | ||
<div align="center"> | ||
|
||
# Utils | ||
|
||
Utils for .NET | ||
|
||
[![GitHub release](https://img.shields.io/github/v/release/NotOfficer/Utils?logo=github)](https://github.com/NotOfficer/Utils/releases/latest) [![Nuget](https://img.shields.io/nuget/v/OffiUtils?logo=nuget)](https://www.nuget.org/packages/OffiUtils) ![Nuget DLs](https://img.shields.io/nuget/dt/OffiUtils?logo=nuget) [![GitHub issues](https://img.shields.io/github/issues/NotOfficer/Utils?logo=github)](https://github.com/NotOfficer/Utils/issues) [![GitHub License](https://img.shields.io/github/license/NotOfficer/Utils)](https://github.com/NotOfficer/Utils/blob/master/LICENSE) | ||
|
||
</div> | ||
|
||
### NuGet | ||
|
||
```md | ||
Install-Package OffiUtils | ||
``` |
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
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 |
---|---|---|
|
@@ -12,4 +12,4 @@ public void AsSpan() | |
span.Fill(0x69_240); | ||
Assert.All(array, x => Assert.Equal(0x69_240, x)); | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -85,4 +85,4 @@ public void ToUpper() | |
StringUtils.ToUpperAsciiInvariant(str); | ||
Assert.Equal("ABC", str); | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -48,4 +48,4 @@ public static string GetUnescapedString(ReadOnlySpan<byte> utf8Source) | |
|
||
return utf8String; | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,10 +1,37 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
|
||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | ||
<Authors>NotOfficer</Authors> | ||
<Company>NotOfficer</Company> | ||
<Description>Utils for .NET</Description> | ||
<Copyright>Copyright (c) 2024 NotOfficer</Copyright> | ||
<PackageLicenseFile>LICENSE</PackageLicenseFile> | ||
<PackageProjectUrl>https://github.com/NotOfficer/Utils</PackageProjectUrl> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<RepositoryUrl>https://github.com/NotOfficer/Utils</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageTags>utils</PackageTags> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
<FileVersion>1.0.0.0</FileVersion> | ||
<Version>1.0.0</Version> | ||
<NeutralLanguage>en</NeutralLanguage> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="..\..\icon.png"> | ||
<Pack>True</Pack> | ||
<PackagePath></PackagePath> | ||
</None> | ||
<None Include="..\..\LICENSE"> | ||
<Pack>True</Pack> | ||
<PackagePath></PackagePath> | ||
</None> | ||
</ItemGroup> | ||
|
||
</Project> |
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 |
---|---|---|
|
@@ -147,4 +147,4 @@ public static string RealClone(string value) | |
value.AsSpan().CopyTo(GetSpan(clone)); | ||
return clone; | ||
} | ||
} | ||
} |