Skip to content

Commit 4fd51d3

Browse files
authored
Merge pull request #7 from dexcompiler/copilot/nuget-ci-publish-wiring
Add NuGet CI publishing wiring
2 parents 5b53fbf + 6894b44 commit 4fd51d3

4 files changed

Lines changed: 90 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build-test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: |
24+
8.0.x
25+
9.0.x
26+
10.0.x
27+
28+
- name: Restore
29+
run: dotnet restore Ed25519.sln --nologo
30+
31+
- name: Build
32+
run: dotnet build Ed25519.sln --configuration Release --no-restore --nologo
33+
34+
- name: Test
35+
run: dotnet test tests/Ed25519.Tests.csproj --configuration Release --no-build --nologo
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish NuGet
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: |
24+
8.0.x
25+
9.0.x
26+
10.0.x
27+
28+
- name: Restore
29+
run: dotnet restore Ed25519.sln --nologo
30+
31+
- name: Build
32+
run: dotnet build Ed25519.sln --configuration Release --no-restore --nologo
33+
34+
- name: Test
35+
run: dotnet test tests/Ed25519.Tests.csproj --configuration Release --no-build --nologo
36+
37+
- name: Pack
38+
run: dotnet pack src/Ed25519.csproj --configuration Release --no-build --nologo -o artifacts
39+
40+
- name: Push to NuGet
41+
run: dotnet nuget push artifacts/*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ A pure C# implementation of the Ed25519 digital signature algorithm, ported from
1212

1313
## Installation
1414

15+
Install from NuGet:
16+
1517
```bash
16-
dotnet add package Ed25519
18+
dotnet add package Dexcompiler.Ed25519
1719
```
1820

21+
> Note: This package ID is the canonical package name for this repository. The similarly named `Ed25519` package on NuGet is a different project.
22+
1923
## Usage
2024

2125
### Generate a Keypair
@@ -157,6 +161,14 @@ The implementation uses constant-time conditional moves (`CMov`, `CSwap`) to pre
157161
- **Base point B**: The standard Ed25519 generator
158162
- **Group order L**: `2²⁵² + 27742317777372353535851937790883648493`
159163

164+
## Maintainer Release Workflow
165+
166+
1. Set `NUGET_API_KEY` in repository secrets.
167+
2. Update `Version` in `src/Ed25519.csproj` for the intended release.
168+
3. Push a tag in `vX.Y.Z` format (for example, `v1.0.5`).
169+
4. GitHub Actions will build, test, pack, and publish `Dexcompiler.Ed25519` with `--skip-duplicate`.
170+
5. Verify package availability on nuget.org and test `dotnet add package Dexcompiler.Ed25519` in a clean project.
171+
160172
## License
161173

162174
MIT License

src/Ed25519.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<OutputType>Library</OutputType>
1212

1313
<!-- NuGet Package metadata -->
14-
<PackageId>Ed25519</PackageId>
14+
<PackageId>Dexcompiler.Ed25519</PackageId>
1515
<Version>1.0.4</Version>
1616
<Authors>Dexter Ajoku</Authors>
1717
<Description>Pure C# implementation of Ed25519 digital signatures. RFC 8032 compliant, ported from ref10 reference implementation. Includes PKCS#8/SPKI/PEM key import/export.</Description>

0 commit comments

Comments
 (0)