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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: artifacts/packages/*.nupkg
path: |
artifacts/packages/*.nupkg
artifacts/packages/*.snupkg
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
publish:
description: Publish to NuGet when NUGET_API_KEY is configured.
required: true
default: false
type: boolean

permissions:
contents: read

jobs:
package:
name: Build, test, pack, and publish
runs-on: ubuntu-latest
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Restore
run: dotnet restore Termii.SDK.sln

- name: Build
run: dotnet build Termii.SDK.sln --configuration Release --no-restore

- name: Unit tests
run: dotnet test tests/Termii.Tests/Termii.Tests.csproj --configuration Release --no-build --logger "trx;LogFileName=unit-tests.trx"

- name: Integration tests
run: dotnet test tests/Termii.IntegrationTests/Termii.IntegrationTests.csproj --configuration Release --no-build --logger "trx;LogFileName=integration-tests.trx"

- name: Pack
run: dotnet pack src/Termii/Termii.csproj --configuration Release --no-build --output artifacts/packages

- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: |
artifacts/packages/*.nupkg
artifacts/packages/*.snupkg

- name: Publish to NuGet
if: ${{ (github.event_name == 'push' || inputs.publish) && env.NUGET_API_KEY != '' }}
run: dotnet nuget push "artifacts/packages/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate
7 changes: 7 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/teesofttech/Termii.SDK</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<Authors>Teesoft Tech</Authors>
<Company>Teesoft Tech</Company>
</PropertyGroup>
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Teesoft Tech

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Termii .NET SDK

[![CI](https://github.com/teesofttech/Termii.SDK/actions/workflows/ci.yml/badge.svg)](https://github.com/teesofttech/Termii.SDK/actions/workflows/ci.yml)

A .NET SDK for the Termii messaging, token, and insights APIs.

> This SDK is in early development. The first milestones establish the client, tests, examples, API coverage matrix, and package structure before endpoint support is added feature by feature.
Expand All @@ -15,6 +17,12 @@ The initial repository setup includes:

## Usage

Install the package:

```bash
dotnet add package Termii.SDK
```

```csharp
using Termii;

Expand Down Expand Up @@ -88,3 +96,7 @@ Development is tracked through GitHub issues:
- CI, documentation, NuGet packaging, and GitHub Releases.

Official Termii documentation: https://developer.termii.com/

## License

This project is licensed under the MIT License.
10 changes: 5 additions & 5 deletions docs/API_COVERAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ The Termii docs describe a REST/JSON API and state that each account has its own
| Error handling and request validation | Implemented | #6, PR #19 |
| Reusable fake HTTP test helpers and opt-in live test conventions | Implemented | #10, PR #20 |
| README endpoint examples | Planned | #12 |
| CI build/test/package validation | In progress | #11 |
| NuGet package metadata and publishing workflow | Planned | #8 |
| CI build/test/package validation | Implemented | #11, PR #22 |
| NuGet package metadata and publishing workflow | In progress | #8 |
| First GitHub Release and NuGet publish | Planned | #13 |

## Endpoint Coverage
Expand All @@ -42,9 +42,9 @@ The Termii docs describe a REST/JSON API and state that each account has its own
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Messaging | Fetch sender IDs | GET | `/api/sender-id` | Query | `TermiiClient.SenderIds` | Planned | #3 | Planned unit + optional integration |
| Messaging | Request sender ID | POST | `/api/sender-id/request` | JSON body | `TermiiClient.SenderIds` | Planned | #3 | Planned unit + optional integration |
| Messaging | Send SMS/channel message | POST | `/api/sms/send` | JSON body | `TermiiClient.Messaging` | In progress | #7 | Unit tests added |
| Messaging | Send WhatsApp conversational message | POST | `/api/sms/send` | JSON body | `TermiiClient.Messaging` | In progress | #7 | Unit tests added |
| Messaging | Send bulk message | POST | `/api/sms/send/bulk` | JSON body | `TermiiClient.Messaging` | In progress | #7 | Unit tests added |
| Messaging | Send SMS/channel message | POST | `/api/sms/send` | JSON body | `TermiiClient.Messaging` | Implemented | #7, PR #21 | Unit tests added |
| Messaging | Send WhatsApp conversational message | POST | `/api/sms/send` | JSON body | `TermiiClient.Messaging` | Implemented | #7, PR #21 | Unit tests added |
| Messaging | Send bulk message | POST | `/api/sms/send/bulk` | JSON body | `TermiiClient.Messaging` | Implemented | #7, PR #21 | Unit tests added |
| Messaging | Send via Number API | POST | `/api/sms/number/send` | Query or JSON body, docs/examples vary | `TermiiClient.Messaging` or `TermiiClient.Numbers` | Planned | #5 | Planned unit + optional integration |
| Token | Send OTP token | POST | `/api/sms/otp/send` | JSON body | `TermiiClient.Token` | Planned | #4 | Planned unit + optional integration |
| Token | Verify OTP token | POST | `/api/sms/otp/verify` | JSON body | `TermiiClient.Token` | Planned | #4 | Planned unit + optional integration |
Expand Down
27 changes: 27 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Releasing

This project publishes the SDK as a NuGet package from version tags.

## Versioning

- Use semantic versioning.
- Keep `VersionPrefix` in `src/Termii/Termii.csproj` aligned with the release tag.
- Use preview suffixes for pre-release packages, for example `0.1.0-preview.1`.

## Release Checklist

1. Confirm all intended issues for the release are merged.
2. Confirm CI is green on `main`.
3. Update package metadata and README examples if needed.
4. Update `VersionPrefix` in `src/Termii/Termii.csproj`.
5. Create and push a tag like `v0.1.0`.
6. Confirm the release workflow creates the package artifact.
7. Confirm NuGet publishing succeeds when the `NUGET_API_KEY` secret is configured.

## Required Secrets

| Secret | Purpose |
| --- | --- |
| `NUGET_API_KEY` | API key used by the release workflow to publish to NuGet.org. |

The release workflow skips the publish step when `NUGET_API_KEY` is not set, but still builds, tests, packs, and uploads the package artifact.
9 changes: 8 additions & 1 deletion src/Termii/Termii.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<AssemblyName>Termii</AssemblyName>
<RootNamespace>Termii</RootNamespace>
<PackageId>Termii</PackageId>
<PackageId>Termii.SDK</PackageId>
<VersionPrefix>0.1.0</VersionPrefix>
<Description>A .NET SDK for the Termii messaging, token, and insights APIs.</Description>
<PackageReleaseNotes>Initial SDK package metadata and release workflow preparation.</PackageReleaseNotes>
<PackageTags>termii;sms;otp;messaging;dotnet;sdk</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
<None Include="../../README.md" Pack="true" PackagePath="/" />
</ItemGroup>
</Project>
Loading