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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ secrets, API keys, or PII.

## Environment

- **Package version:** <!-- e.g. 0.4.0-alpha -->
- **Package version:** <!-- e.g. 0.1.0 -->
- **.NET SDK version:** <!-- output of `dotnet --version` -->
- **OS:** <!-- e.g. macOS 14.5, Windows 11, Ubuntu 24.04 -->
- **Coinbase environment:** <!-- production / sandbox -->
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/build.yml

This file was deleted.

81 changes: 2 additions & 79 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: CI/CD Pipeline

on:
push:
branches: [ main, develop ]
tags:
- 'v*'
branches: [ main ]
pull_request:
branches: [ main ]

Expand Down Expand Up @@ -114,79 +112,4 @@ jobs:
echo "Checking for vulnerable packages..."
dotnet list package --vulnerable --include-transitive || echo "Some test projects have vulnerabilities - this is informational only"
echo "Checking for deprecated packages..."
dotnet list package --deprecated --include-transitive || echo "Some packages are deprecated - this is informational only"

publish-preview:
needs: [test, code-quality, security-scan]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '10.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration Release

- name: Create preview package
run: |
VERSION=$(date +%Y%m%d%H%M%S)
dotnet pack Coinbase.AdvancedTrade.Client/Coinbase.AdvancedTrade.Client.csproj \
--no-build \
--configuration Release \
--output ./packages \
/p:VersionSuffix="preview-$VERSION"

- name: Upload preview package
uses: actions/upload-artifact@v4
with:
name: preview-packages
path: ./packages/*.nupkg

publish-release:
needs: [test, code-quality, security-scan]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '10.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration Release

- name: Pack
run: dotnet pack Coinbase.AdvancedTrade.Client/Coinbase.AdvancedTrade.Client.csproj \
--no-build \
--configuration Release \
--output ./packages

- name: Publish to NuGet.org
run: dotnet nuget push ./packages/*.nupkg \
--source https://api.nuget.org/v3/index.json \
--api-key ${{ secrets.NUGET_API_KEY }} \
--skip-duplicate

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: ./packages/*.nupkg
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dotnet list package --deprecated --include-transitive || echo "Some packages are deprecated - this is informational only"
30 changes: 0 additions & 30 deletions .github/workflows/publish-nuget.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
branches: [main]

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
version: ${{ steps.release.outputs.version }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

publish:
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration Release /p:Version=${{ needs.release-please.outputs.version }}

- name: Pack
run: dotnet pack Coinbase.AdvancedTrade.Client/Coinbase.AdvancedTrade.Client.csproj --no-build --configuration Release --output ./packages /p:Version=${{ needs.release-please.outputs.version }}

- name: Publish to NuGet.org
run: dotnet nuget push ./packages/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ FodyWeavers.xsd
nupkg/
*.orig

# Planning and spec artifacts (kept locally only — never committed)
docs/superpowers/

# Sensitive configuration files
appsettings.Production.json
appsettings.Development.local.json
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.0"
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

All notable changes to this project will be documented in this file.
17 changes: 9 additions & 8 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

.NET 10 client library for the Coinbase Advanced Trade API, published as a NuGet package (`Coinbase.AdvancedTrade.Client`, currently `0.4.0-alpha`). Provides full REST API coverage (48 endpoints) with ES256 JWT authentication, Polly resilience policies, Refit-generated HTTP clients, and Microsoft DI integration.
.NET 10 client library for the Coinbase Advanced Trade API, published as a NuGet package (`Coinbase.AdvancedTrade.Client`). Provides full REST API coverage (48 endpoints) with ES256 JWT authentication, Polly resilience policies, Refit-generated HTTP clients, and Microsoft DI integration.

## Development Commands

Expand Down Expand Up @@ -73,15 +73,16 @@ Consumer → ICoinbaseAdvancedTradeClient (resilience + error mapping)

## CI/CD

CI runs on push to `main`/`develop` and PRs to `main` (`.github/workflows/ci.yml`):
CI runs on push to `main` and PRs to `main` (`.github/workflows/ci.yml`):
- Matrix: ubuntu/windows/macos + .NET 10
- Stages: build, unit tests, integration tests, `dotnet format` check, analyzer warnings-as-errors, security scan
- Publishing: version tags (`v*`) trigger NuGet.org publish + GitHub Release

## Publishing
## Releases

1. Update `<Version>` in `Coinbase.AdvancedTrade.Client.csproj`
2. Commit, tag (`git tag v0.4.0-alpha`), push tag
3. CI builds, tests, publishes to NuGet.org (requires `NUGET_API_KEY` secret)
Releases are driven by [release-please](https://github.com/googleapis/release-please) on Conventional Commits — there is no manual version bump or tag step.

Note: v1.0.0 was accidentally published and unlisted. Use `--prerelease` flag for current alpha versions.
- Version source of truth: `.release-please-manifest.json` at the repo root.
- On every push to `main`, `.github/workflows/release-please.yml` opens or updates a "Release PR" that bumps the version and updates `CHANGELOG.md` based on Conventional Commits since the last release.
- Merging the Release PR creates the git tag and GitHub Release, and the same workflow's `publish` job builds with `/p:Version=$VERSION`, packs `Coinbase.AdvancedTrade.Client.csproj`, and pushes to NuGet.org (requires the `NUGET_API_KEY` secret).
- Pre-1.0, `feat:` bumps patch and `feat!:` / `BREAKING CHANGE:` bumps minor (per `release-please-config.json`).
- See [`CONTRIBUTING.md`](CONTRIBUTING.md#commit-messages) for the Conventional Commits rules contributors must follow.
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,34 @@ Additionally:
- Use **FluentAssertions** for assertions (`result.Should().Be(...)`).
- Client methods return `ApiResponse<T>` and never throw — your tests should assert on `IsSuccess`/`ErrorMessage`, not `try/catch`.

## Commit Messages

This repository uses [Conventional Commits](https://www.conventionalcommits.org/) to drive automated versioning and changelog generation via [release-please](https://github.com/googleapis/release-please).

**Format:**

```
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
```

**Types that trigger releases (pre-1.0):**

- `fix:` — patch bump (e.g., 0.1.3 → 0.1.4)
- `feat:` — patch bump pre-1.0 (e.g., 0.1.3 → 0.1.4), still grouped as a Feature in the changelog; becomes minor post-1.0
- `feat!:` or footer `BREAKING CHANGE:` — minor bump pre-1.0 (e.g., 0.1.3 → 0.2.0); becomes major post-1.0 (e.g., 1.2.3 → 2.0.0)

**Types that appear in the changelog but do not trigger releases:**

- `docs:`, `perf:`, `refactor:`, `build:`, `ci:`, `chore:`, `test:`, `style:`

**Cutting 1.0.0:** Include the footer `Release-As: 1.0.0` on any commit merged to `main`. release-please will open a Release PR for `1.0.0` on its next run.

Commits that do not follow this convention will not produce a release but will still be merged normally.

## Pull Request Guidelines

1. Branch from `main`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Coinbase.AdvancedTrade.Client</PackageId>
<Version>0.4.0-alpha</Version>
<Authors>Luna Crypto Trading</Authors>
<Company>Luna Crypto Trading</Company>
<Description>A comprehensive .NET client library for the Coinbase Advanced Trade API with full REST API coverage (48 endpoints), ES256 JWT authentication, Polly resilience policies, Refit-generated HTTP clients, and Microsoft DI integration. Covers accounts, orders, products, portfolios, futures, perpetuals, converts, payments, and public market data.</Description>
<PackageReleaseNotes>Alpha v0.4.0 - Full Coinbase Advanced Trade REST API coverage. Added 28 new endpoints: order fills, product book, portfolio CRUD, 9 futures/CFM, 6 perpetuals/INTX, 3 convert, 2 payment methods, 6 public market data, and API key permissions. Backfilled missing query parameters on existing endpoints. Reorganized client into partial classes by domain.</PackageReleaseNotes>
<PackageTags>coinbase;api;client;crypto;trading;dependency-injection</PackageTags>
<RepositoryUrl>https://github.com/Luna-Crypto-Trading/Coinbase.AdvancedTrade.Client</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
13 changes: 13 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "simple",
"package-name": "Coinbase.AdvancedTrade.Client",
"changelog-path": "CHANGELOG.md",
"include-component-in-tag": false,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true
}
}
}
Loading