Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write # attach assets to the GitHub Release
id-token: write # OIDC token for NuGet Trusted Publishing (keyless, no long-lived API key)
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand All @@ -32,11 +33,20 @@ jobs:
- name: Pack
run: dotnet pack src/UniswapSharp/UniswapSharp.csproj -c Release -o ./artifacts --no-build

# Trusted Publishing: exchange the GitHub OIDC token for a short-lived (1 hour) NuGet API key.
# No long-lived secret to store/rotate. Requires a policy on nuget.org:
# Repository Owner: grinidx · Repository: UniswapSharp · Workflow File: release.yml
# NUGET_USER is your nuget.org profile username (not email); store it as a repo secret/variable.
- name: NuGet login (OIDC → temporary API key)
id: nuget-login
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
with:
user: ${{ secrets.NUGET_USER }}

- name: Push to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet nuget push "./artifacts/*.nupkg" --api-key "$NUGET_API_KEY" \
dotnet nuget push "./artifacts/*.nupkg" \
--api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" \
--source https://api.nuget.org/v3/index.json --skip-duplicate

- name: Attach artifacts to GitHub Release
Expand Down
6 changes: 4 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ place. Remaining work is **Phase B** (V3 feature-parity port) and beyond.
3. **`CurrencyAmount.ToExact` hardening** - DONE. Reimplemented with exact `BigInteger` arithmetic
(Decimal.js parity); the old `(decimal)` cast overflowed for large amounts. Hardened test-first,
incl. a max-uint256 case (`CurrencyAmountTests.cs`).
4. **NuGet packaging** - DONE (metadata, SourceLink, symbols, MinVer, tag-driven release). To publish,
add the `NUGET_API_KEY` secret and push a `v*` tag; `1.0.0` is reserved for V3-parity-complete.
4. **NuGet packaging** - DONE (metadata, SourceLink, symbols, MinVer `v`-prefixed tag-driven release).
Publishing uses **NuGet Trusted Publishing (OIDC, keyless)** via `release.yml`: configure a trusted-publishing
policy on nuget.org (owner `grinidx`, repo `UniswapSharp`, workflow `release.yml`), set the `NUGET_USER`
repo secret to your nuget.org profile username, then push a `v*` tag. No long-lived API key is stored.
5. **README + usage example** - DONE (see `README.md` + `docs/PORTING.md`); keep in sync as stubs land.
6. **V4 (later phase)** - Uniswap V4 reuses V3's concentrated-liquidity math (ticks,
sqrt-price) and adds the singleton `PoolManager`, hooks and flash accounting. It is
Expand Down
Loading