Skip to content

Commit 2bd7897

Browse files
committed
Update README
1 parent 1a9c8e8 commit 2bd7897

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

.github/workflows/pack-and-publish.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
pack-and-publish:
1010
runs-on: ubuntu-24.04
11+
environment:
12+
name: production
1113
timeout-minutes: 5
1214

1315
permissions:
@@ -27,7 +29,7 @@ jobs:
2729
- name: Specify .NET version
2830
run: dotnet new globaljson --sdk-version 10.0.103 --roll-forward disable
2931

30-
- name: Show info
32+
- name: Show .NET info
3133
run: dotnet --info
3234

3335
- name: Download native libs
@@ -38,7 +40,7 @@ jobs:
3840
merge-multiple: true
3941
path: ./ZstdNet/
4042

41-
- name: Check attestation
43+
- name: Check native libs attestation
4244
env:
4345
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4446
GH_FORCE_TTY: '100%'
@@ -48,22 +50,16 @@ jobs:
4850
- name: Pack
4951
run: dotnet pack --configuration Release --output ./
5052

51-
- name: Provenance
52-
uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0
53+
- name: Attest NuGet package provenance
54+
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
5355
with:
54-
subject-path: './*.nupkg'
56+
subject-path: './ZstdNet.*.nupkg'
5557

5658
- name: Upload artifacts
5759
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
5860
with:
5961
name: package
60-
path: './*.nupkg'
62+
path: './ZstdNet.*.nupkg'
6163

62-
# - name: NuGet Login
63-
# uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1
64-
# id: login
65-
# with:
66-
# user: dscheg
67-
68-
# - name: Publish Nuget package
69-
# run: dotnet nuget push *.nupkg --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
64+
- name: Publish Nuget package
65+
run: dotnet nuget push ZstdNet.*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@ ZstdNet
55
[![NuGet](https://img.shields.io/nuget/v/ZstdNet.svg)](https://www.nuget.org/packages/ZstdNet/)
66
[![NuGet Downloads](https://img.shields.io/nuget/dt/ZstdNet.svg)](https://www.nuget.org/packages/ZstdNet)
77

8-
**ZstdNet** is a wrapper of **Zstd** native library for .NET languages targeting netstadard2.0 and netstadard2.1.
9-
ZstdNet NuGet package includes pre-built native shared libraries for various platforms,
10-
check [build-native.yml](.github/workflows/build-native.yml) for more info.
8+
**ZstdNet** is a wrapper of **Zstd** native library for .NET languages targeting `netstadard2.{0|1}`.
9+
ZstdNet NuGet package includes pre-built native shared libraries for [various platforms](.github/workflows/build-native.yml), including `win`, `linux`, `osx`.
10+
11+
The package relies on the [dotnet runtime identifier resolution mechanism](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog).
12+
For .NET Framework, the package provides a [targets](ZstdNet/build/ZstdNet.targets) fallback, which requires an explicit selection of the platform — `x86`, `x64` or `ARM64`).
13+
14+
If you need to resolve native dependency at runtime, you can use the `NativeLibrary.SetDllImportResolver` (see an [example](ZstdNet.Tests/NativeResolver.cs)).
15+
And for .NET Framework — `SetDllDirectory` from `kernel32.dll`.
16+
17+
Provenance attestation is enabled for all artifacts in this repository including native libs, see page [Attestations](https://github.com/skbkontur/ZstdNet/attestations).
1118

1219
### Features
1320

ZstdNet/ZstdNet.csproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@
1616
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1717
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
1818
<EnablePackageValidation>true</EnablePackageValidation>
19+
<PackageReadmeFile>README.md</PackageReadmeFile>
1920
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
2021
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2122
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2223
<Deterministic>true</Deterministic>
2324
</PropertyGroup>
2425

2526
<ItemGroup>
26-
<None Include="build\*.targets" Pack="true" PackagePath="build\" />
27-
<None Include="runtimes\**\*" Pack="true" CopyToOutputDirectory="PreserveNewest" PackagePath="runtimes\" />
28-
<None Include="..\LICENSE" Pack="true" PackagePath="lib\" />
27+
<None Include="build/*.targets" Pack="true" PackagePath="build/" />
28+
<None Include="runtimes/**/*" Pack="true" CopyToOutputDirectory="PreserveNewest" PackagePath="runtimes/" />
29+
<None Include="../LICENSE" Pack="true" PackagePath="/" />
30+
<None Include="../README.md" Pack="true" PackagePath="/" />
2931
</ItemGroup>
3032

3133
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">

0 commit comments

Comments
 (0)