Skip to content

Commit fe54246

Browse files
authored
Add nightly steps to README (#130)
* GitHub package registry doesn't support build metadata properly * How to opt into the nightly feed
1 parent 9db8a6d commit fe54246

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

Directory.Build.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@
6363
<Exec Command="git rev-parse HEAD" ConsoleToMSBuild="true">
6464
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommit" />
6565
</Exec>
66-
<CreateProperty Value="$(PackageVersion)-ci-$(GitCommit)+$([System.DateTime]::UtcNow.ToString('yyyy.MM.dd-HH.mm.ss'))">
66+
<!-- Appending build date and time as metadata for version is blocked on https://github.community/t/bug-nuget-support-build-metadata-properly/117606 -->
67+
<!-- <CreateProperty Value="$(PackageVersion)-ci-$(GitCommit)+$([System.DateTime]::UtcNow.ToString('yyyy.MM.dd-HH.mm.ss'))"> -->
68+
<CreateProperty Value="$(PackageVersion)-ci-$(GitCommit)">
6769
<Output TaskParameter="Value" PropertyName="PackageVersion" />
6870
</CreateProperty>
6971
</Target>

ReadMe.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,37 @@ Analyzing an expression | Solving an equation
262262

263263
# [Documentation](https://github.com/verybadcat/CSharpMath/wiki/Documentation-of-public-facing-APIs-of-CSharpMath.Rendering,-CSharpMath.SkiaSharp-and-CSharpMath.Forms-MathViews)
264264

265+
# Opting in to the nightly feed
266+
267+
For those who wish to be even more updated than prereleases, you can opt in to the nightly feed which is updated whenever the master branch has a new commit.
268+
269+
1. Log in to GitHub
270+
2. Generate a new token (a 40-digit hexadecimal number) in https://github.com/settings/tokens/new with the `read:packages` scope
271+
3. Create a new file called `NuGet.Config` or `nuget.config` in the same folder as your solution with content
272+
```xml
273+
<?xml version="1.0" encoding="utf-8"?>
274+
<configuration>
275+
<packageSources>
276+
<add key="CSharpMathNightly" value="https://nuget.pkg.github.com/verybadcat/index.json" />
277+
</packageSources>
278+
<packageSourceCredentials>
279+
<CSharpMathNightly>
280+
<add key="Username" value="USERNAME" />
281+
<add key="ClearTextPassword" value="TOKEN" />
282+
</CSharpMathNightly>
283+
</packageSourceCredentials>
284+
</configuration>
285+
```
286+
4. Replace `USERNAME` in the above file with your GitHub username and `TOKEN` with your generated token.
287+
5. Open a package webpage in https://github.com/verybadcat/CSharpMath/packages
288+
6. Insert the following into your `.csproj`:
289+
```xml
290+
<ItemGroup>
291+
<PackageReference Include="PACKAGE" Version="VERSION" />
292+
</ItemGroup>
293+
```
294+
7. Replace `PACKAGE` in the above file by the package name in the webpage, e.g. `CSharpMath.SkiaSharp`, and `VERSION` by the version in the webpage, e.g. `0.4.2-ci-9db8a6dec29202804764fab9d6f7f19e43c3c083`. The 40-digit hexadecimal number at the end of the version is the Git commit that was the package was built on. CI versions are after the current version, aka `0.4.1-ci-xxx``0.4.2``0.4.2-ci-xxx`.
295+
265296
# Project structure
266297

267298
<!--

0 commit comments

Comments
 (0)