Skip to content

Commit

Permalink
switch to circle-ci
Browse files Browse the repository at this point in the history
assembly has now a strong name
upgrade compiler to .net 3.1 (2.1 is out of support)
  • Loading branch information
LordVeovis committed Jul 18, 2021
1 parent 51121f3 commit d9598ee
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 19 deletions.
91 changes: 87 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,96 @@
version: 2.1

jobs:
build:
docker:
- image: microsoft/dotnet:2.1-sdk-alpine
- image: mcr.microsoft.com/dotnet/sdk:3.1
environment:
project_name: Kveer.XmlRPC
configuration: Release
steps:
- checkout
- run: dotnet restore "${project_name}/${project_name}.csproj"
- run: dotnet build -c "${configuration}" "${project_name}/${project_name}.csproj"
- run: dotnet test "${project_name}".Tests
- run:
name: Install mono-devel (sn provider)
command: apt update && apt install -y mono-devel
- run:
name: Install dependencies
command: dotnet restore "${project_name}/${project_name}.csproj"
- run:
name: Set nupkg version
command: |
[ "${CIRCLE_TAG}" == "" ] || sed -i "s_\(<Version>\).*\(</Version>\)_\1$CIRCLE_TAG\2_" "${project_name}/${project_name}.csproj"
grep '<Version' "${project_name}/${project_name}.csproj"
- run:
name: Compile project
command: dotnet build -c "${configuration}" "${project_name}/${project_name}.csproj"
- run:
name: Sign the assembly
command: '[ "${CIRCLE_TAG}" == "" ] || echo "${sn_pwd}" | sn -R ${project_name}/bin/${configuration}/netstandard2.0/${project_name}.dll ${project_name}/sn-prd.pfx'
- run:
name: Run unit tests
command: dotnet test -v n "${project_name}.Tests"
- run:
name: Build nuget package
command: dotnet pack -c "${configuration}" -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg "${project_name}/${project_name}.csproj"
- run:
name: Copy artifacts
command: |
mkdir /artifacts
cp ${project_name}/bin/${configuration}/${project_name}.*.nupkg /artifacts
cp ${project_name}/bin/${configuration}/${project_name}.*.snupkg /artifacts
- store_artifacts:
path: /artifacts
- persist_to_workspace:
root: /artifacts
paths:
- '*'
publish-github-release:
docker:
- image: cibuilds/github:0.10
steps:
- attach_workspace:
at: ./artifacts
- run:
name: "Publish Release on Github"
command: |
ghr -t "${GITHUB_TOKEN}" -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" -c "${CIRCLE_SHA1}" -delete -draft "${CIRCLE_TAG}" ./artifacts/
publish-nuget-package:
docker:
- image: mcr.microsoft.com/dotnet/sdk:3.1
environment:
project_name: Kveer.XmlRPC
steps:
- attach_workspace:
at: ./artifacts
- run:
name: "Push package on nuget"
command: |
cd ./artifacts
dotnet nuget push ${project_name}.$CIRCLE_TAG.nupkg -k $nuget_key -s nuget.org
dotnet nuget push ${project_name}.$CIRCLE_TAG.snupkg -sk $nuget_key -s https://nuget.smbsrc.net/
only:

workflows:
version: 2
main:
jobs:
- build:
filters:
tags:
only: /^\d+\.\d+\.\d+$/
- publish-github-release:
requires:
- build
filters:
branches:
ignore: /.*/
tags:
only: /^\d+\.\d+\.\d+$/
- publish-nuget-package:
requires:
- build
filters:
branches:
ignore: /.*/
tags:
only: /^\d+\.\d+\.\d+$/
11 changes: 5 additions & 6 deletions Kveer.XmlRPC.Tests/Kveer.XmlRPC.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>Kveer.XmlRPC.Tests</RootNamespace>
<Authors>Sébastien Rault</Authors>
<Company>Kveer</Company>
<Description>Unit tests for Kveer.XmlRPC</Description>
<Copyright>Sébastien Rault</Copyright>
<SignAssembly>false</SignAssembly>
<PackageTags>xmlrpc</PackageTags>
<Version>1.0.3</Version>
<Version>1.2.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReleaseNotes></PackageReleaseNotes>
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/LordVeovis/xmlrpc</PackageProjectUrl>
<RepositoryUrl>[email protected]:LordVeovis/xmlrpc.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<ApplicationIcon />
<OutputType>Library</OutputType>
<StartupObject />
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

<ItemGroup>
Expand All @@ -43,9 +44,7 @@
</ItemGroup>

<ItemGroup>
<Compile Update="invoketest.cs">
<SubType>Component</SubType>
</Compile>
<Compile Update="invoketest.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
19 changes: 13 additions & 6 deletions Kveer.XmlRPC/Kveer.XmlRPC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,26 @@
<RootNamespace>CookComputing.XmlRpc</RootNamespace>
<Authors>Sébastien Rault</Authors>
<Company>Kveer</Company>
<Description>A port of CookComputing.XmlRpcV2 for dotnet core 2.</Description>
<Description>A port of CookComputing.XmlRpcV2 for dotnet core.</Description>
<Copyright>Sébastien Rault</Copyright>
<SignAssembly>false</SignAssembly>
<PackageTags>xmlrpc</PackageTags>
<Version>1.0.3</Version>
<Version>1.2.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReleaseNotes>- publish the symbols on https://nuget.smbsrc.net
- fully automate the build</PackageReleaseNotes>
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
<PackageReleaseNotes>- switch to circle-ci
- assembly has now a strong name
- upgrade compiler to .net 3.1 as 2.1 is out of support (still .netstandard2.0 compliant)</PackageReleaseNotes>
<PackageLicense>MIT License</PackageLicense>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/LordVeovis/xmlrpc</PackageProjectUrl>
<RepositoryUrl>[email protected]:LordVeovis/xmlrpc.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<AssemblyOriginatorKeyFile>sn-prd.pub</AssemblyOriginatorKeyFile>
<SignAssembly>false</SignAssembly>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup Condition=" '$(CIRCLE_TAG)' != '' ">
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
</PropertyGroup>

<ItemGroup>
Expand Down
Binary file added Kveer.XmlRPC/sn-prd.pfx
Binary file not shown.
Binary file added Kveer.XmlRPC/sn-prd.pub
Binary file not shown.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Kveer.XmlRPC

[![Build Status](https://gitlab.kveer.fr/veovis/xmlrpc/badges/master/build.svg)](https://gitlab.kveer.fr/veovis/xmlrpc/pipelines)
[![CircleCI](https://circleci.com/gh/LordVeovis/xmlrpc.svg?style=shield)](https://app.circleci.com/pipelines/github/LordVeovis)
[![Build Status](https://gitlab.kveer.fr/veovis/xmlrpc/badges/master/pipeline.svg)](https://gitlab.kveer.fr/veovis/xmlrpc/pipelines)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/72ed394545f947dca0620204fd223627)](https://app.codacy.com/app/LordVeovis/xmlrpc?utm_source=github.com&utm_medium=referral&utm_content=LordVeovis/xmlrpc&utm_campaign=badger)
[![Code Coverage](https://gitlab.kveer.fr/veovis/xmlrpc/badges/master/coverage.svg)](https://gitlab.kveer.fr/veovis/xmlrpc/pipelines)
[![Nuget Downloads](https://img.shields.io/nuget/dt/Kveer.XmlRpc.svg)](https://www.nuget.org/packages/Kveer.XmlRPC/)

This repository contains a .net library for consuming XML-RPC web services. It is a port of the Charles Cook's library mainly for .NET Core 2.x but target the netstandard 2.0, so it can also be used on the full .NET Framework 4.6.1+.
This repository contains a .net library for consuming XML-RPC web services. It is a port of the Charles Cook's library mainly for .NET Core 2.x+ but target the netstandard 2.0, so it can also be used on the full .NET Framework 4.6.1+.

## How to use

Expand All @@ -19,4 +20,4 @@ As a port, very few changes have been done but the API is still the same. The do

This library is licensed under the [MIT license][].

[MIT license]: https://github.com/PowerShell/PowerShell/tree/master/LICENSE.txt
[MIT license]: https://github.com/LordVeovis/xmlrpc/blob/master/LICENSE

0 comments on commit d9598ee

Please sign in to comment.