Skip to content
Open
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
81 changes: 81 additions & 0 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

env:
SH_VERSION_SUFFIX: 'preview'

jobs:
build:
runs-on: windows-latest
environment: dev

steps:
- name: Checkout repository
uses: actions/checkout@v2

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

- name: Calculate Version Number
id: version
run: |
MAJOR_VERSION=${{ vars.MAJOR_VERSIONV4 }}
MINOR_VERSION=${{ vars.MINOR_VERSION }}
BUILD_NUMBER=${GITHUB_RUN_NUMBER}
BRANCH_NAME=${GITHUB_REF##*/}

MAJOR_VERSION=${MAJOR_VERSION:-0}
MINOR_VERSION=${MINOR_VERSION:-0}
VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}"

if [ "$BRANCH_NAME" != "master" ]; then
VERSION="${VERSION}-preview"
fi

echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Major Version: $MAJOR_VERSION"
echo "Minor Version: $MINOR_VERSION"
echo "Build Number: $BUILD_NUMBER"
echo "Branch Name: $BRANCH_NAME"
echo "Version: $VERSION"
shell: bash

- name: Clear NuGet Cache
run: dotnet nuget locals all --clear

- name: Restore NuGet packages
run: dotnet restore "src/SignhostAPIRetryClient.sln"
continue-on-error: ${{ github.event.pull_request.head.repo.fork == true }}
if: ${{ github.event.pull_request.head.repo.fork == false }}
- name: Build solution
run: dotnet build "src/SignhostAPIRetryClient.sln" --configuration Release

- name: Test with Coverage
run: dotnet test --no-build src/Signhost.APIClient.Tests/Signhost.APIClient.Tests.csproj --collect:"XPlat Code Coverage" -c Release

- name: Pack NuGet package
run: dotnet pack "src/Signhost.APIClient/Signhost.APIClient.csproj" --configuration Release /p:Version=${{ env.VERSION }} /p:IncludeReadmeFile=true
if: ${{ github.event.pull_request.head.repo.fork == false }}

- name: Upload NuGet Package
uses: actions/upload-artifact@v3
with:
name: Nuget
path: '**/*.nupkg'
if: ${{ github.event.pull_request.head.repo.fork == false }}

- name: Publish NuGet package to NuGet.org
run: |
dotnet nuget push '**/*.nupkg' --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
env:
POLLY_TEST: ${{ secrets.NUGET_KEY }}
if: ${{ github.event.pull_request.head.repo.fork == false }}
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# SignhostClientLibrary.Polly
[![Nuget package](https://img.shields.io/nuget/v/EntrustSignhostClientLibrary.svg)](https://www.nuget.org/Packages/EntrustSignhostClientLibrary)

This repository contains the implementation for the Signhost API Retry Client. It provides functionality for interacting with the Signhost API, with automatic retrying on failures using a custom retry policy.

### Install
Get it on NuGet:

`PM> Install-Package SignhostClientLibrary.Polly`

### Example code
For detailed examples, visit: [https://github.com/Evidos/SignhostClientLibrary/blob/master/README.md](https://github.com/Evidos/SignhostClientLibrary/blob/master/README.md)

```c#
var settings = new SignHostApiClientSettings("YourAppKey");

var retryClient = new SignHostApiRetryClient(settings);

```
32 changes: 0 additions & 32 deletions appveyor.yml

This file was deleted.

5 changes: 0 additions & 5 deletions nuget.config

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Build">
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
17 changes: 12 additions & 5 deletions src/Signhost.APIClient/Signhost.APIClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,26 @@
<RootNamespace>Signhost.APIClient</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Label="Package">
<VersionBuildNumber Condition="'$(APPVEYOR_BUILD_NUMBER)' != ''">$(APPVEYOR_BUILD_NUMBER)</VersionBuildNumber>
<VersionBuildNumber Condition="'$(VersionBuildNumber)' == ''">0</VersionBuildNumber>
<VersionPrefix>4.0.$(VersionBuildNumber)</VersionPrefix>
<VersionSuffix Condition="'$(VersionSuffix)' == ''">$(SH_VERSION_SUFFIX)</VersionSuffix>
<Authors>Evidos</Authors>
<Authors>Entrust</Authors>
<Product>Signhost</Product>
<Copyright>Copyright 2019 © Evidos</Copyright>
<Copyright>Copyright 2019 © Entrust</Copyright>
<PackageProjectUrl>https://github.com/Evidos/SignhostClientLibrary.Polly</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<PackageId>SignhostClientLibrary.Polly</PackageId>
<PackageId>EntrustSignhostClientLibrary.Polly</PackageId>
<PackageTags>sign;signing;digital signature;pdf</PackageTags>
<PackageReleaseNotes>
* 4.0.0 - Bump to SignhostClientLibrary v4 major version
</PackageReleaseNotes>
<Company>Evidos</Company>
<Company>Entrust</Company>
<Description>A .NET library for the signhost.com api, with a built-in retry mechanism.</Description>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
Expand All @@ -36,6 +40,9 @@
</PackageReference>
<PackageReference Include="Polly" Version="7.1.1" />
<PackageReference Include="EntrustSignhostClientLibrary" Version="4.0.584-preview" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
</ItemGroup>

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