Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup cicd pipeline #17

Merged
merged 25 commits into from
Dec 18, 2023
64 changes: 64 additions & 0 deletions .github/workflows/publish-nuget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
BUILD_CONFIG: 'Release'
SOLUTION: 'src/Hyperledger.Aries.sln'
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
IS_MAIN_BRANCH: ${{ github.ref == 'refs/heads/main' }}

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set Version
run: |
sudo apt-get install -y libxml2-utils
VERSION=$(xmllint --xpath "string(/Project/PropertyGroup/Version)" Directory.Build.props)
if $IS_MAIN_BRANCH; then
SUFFIX="-rc.{{ github.run_number }}"
elif $IS_PULL_REQUEST; then
SUFFIX="-pr.${{ github.event.pull_request.number }}.${{ github.run_number }}"
fi
echo "APP_VERSION=$VERSION$SUFFIX" >> $GITHUB_ENV

- name: Setup NuGet
uses: NuGet/[email protected]

- name: Restore dependencies
run: nuget restore $SOLUTION

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.*

# - name: Install libindy library
# run: |
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
# sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable"
# sudo apt-get update \
# apt-get install -y libindy

- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG -p:Version=$APP_VERSION --no-restore
#
# - name: Run tests
# run: dotnet test $SOLUTION --configuration $BUILD_CONFIG --no-restore --no-build --verbosity normal

- name: Pack WalletFramework
run: dotnet pack $SOLUTION --configuration $BUILD_CONFIG -p:Version=$APP_VERSION --no-build --output .

- name: Publish
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
17 changes: 6 additions & 11 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
<Product>Hyperledger Aries Dotnet</Product>
<RepositoryUrl>https://github.com/hyperledger/aries-framework-dotnet.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>1.6.4</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<!-- Common compile parameters -->
<PropertyGroup>
<!-- We use full (Windows PDBs) until cross platform support for source link will get better -->
Expand All @@ -21,11 +20,9 @@
<Nullable>disable</Nullable>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<!--Versions of packages used across the repository-->
<PropertyGroup Label="Package Versions">
<MicrosoftAspNetCoreHttpAbstractionsVersion>2.2.0</MicrosoftAspNetCoreHttpAbstractionsVersion>
Expand All @@ -35,13 +32,12 @@
<MicrosoftExtensionsHostingVersion>3.1.5</MicrosoftExtensionsHostingVersion>
<MicrosoftExtensionsHttpVersion>3.1.5</MicrosoftExtensionsHttpVersion>
<MicrosoftExtensionsLoggingVersion>3.1.5</MicrosoftExtensionsLoggingVersion>
<MicrosoftNETTestSdkVersion>17.7.2</MicrosoftNETTestSdkVersion>
<MicrosoftNETTestSdkVersion>16.6.1</MicrosoftNETTestSdkVersion>
<SystemReactiveLinqVersion>4.4.1</SystemReactiveLinqVersion>
<SystemTextJsonVersion>4.7.2</SystemTextJsonVersion>

<AutofacExtensionsDependencyInjectionVersion>8.0.0</AutofacExtensionsDependencyInjectionVersion>
<AutofacExtensionsDependencyInjectionVersion>6.0.0</AutofacExtensionsDependencyInjectionVersion>
<DawnGuardVersion>1.12.0</DawnGuardVersion>
<FluentAssertionsVersion>6.12.0</FluentAssertionsVersion>
<FluentAssertionsVersion>5.10.3</FluentAssertionsVersion>
<FluentValidationAspNetCoreVersion>9.2.0</FluentValidationAspNetCoreVersion>
<FluentValidationVersion>9.2.0</FluentValidationVersion>
<FlurlVersion>2.8.2</FlurlVersion>
Expand All @@ -53,16 +49,15 @@
<MoqVersion>4.14.5</MoqVersion>
<MultiformatsBaseVersion>2.0.2</MultiformatsBaseVersion>
<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
<NLogConfigVersion>4.7.15</NLogConfigVersion>
<NLogConfigVersion>4.7.2</NLogConfigVersion>
<PollyVersion>7.2.1</PollyVersion>
<StatelessVersion>5.1.2</StatelessVersion>
<SwashbuckleAspNetCoreAnnotationsVersion>5.5.1</SwashbuckleAspNetCoreAnnotationsVersion>
<SwashbuckleAspNetCoreFiltersVersion>5.1.2</SwashbuckleAspNetCoreFiltersVersion>
<SwashbuckleAspNetCoreSwaggerGenVersion>5.5.1</SwashbuckleAspNetCoreSwaggerGenVersion>
<SwashbuckleAspNetCoreSwaggerUIVersion>5.5.1</SwashbuckleAspNetCoreSwaggerUIVersion>
<SwashbuckleAspNetCoreSwaggerVersion>5.5.1</SwashbuckleAspNetCoreSwaggerVersion>
<XunitRunnerVisualstudioVersion>2.5.3</XunitRunnerVisualstudioVersion>
<XunitRunnerVisualstudioVersion>2.4.2</XunitRunnerVisualstudioVersion>
<XunitVersion>2.4.1</XunitVersion>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Api Library</Description>
<PackageId>WalletFramework.AspNetCore.Contracts</PackageId>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<Description>ASP.NET Core support for Agent Framework</Description>
<PackageId>WalletFramework.AspNetCore</PackageId>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Hyperledger.Aries.Payments.SovrinToken.xml</DocumentationFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>WalletFramework.Routing.Edge</PackageId>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Hyperledger.Aries.Routing.Edge.xml</DocumentationFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>WalletFramework.Routing.Mediator</PackageId>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Hyperledger.Aries.Routing.Mediator.xml</DocumentationFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>WalletFramework.Routing</PackageId>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Hyperledger.Aries.Routing.xml</DocumentationFile>
</PropertyGroup>

Expand Down
3 changes: 2 additions & 1 deletion src/Hyperledger.Aries/Hyperledger.Aries.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>.NET Core tools for building agent services</Description>
<PackageId>WalletFramework</PackageId>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Hyperledger.Aries.xml</DocumentationFile>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Nullable>enable</Nullable>
Expand All @@ -16,7 +17,7 @@
<PackageReference Include="Multiformats.Base" Version="2.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Polly" Version="$(PollyVersion)" />
<PackageReference Include="SD-JWT" Version="0.1.0-CI-20230929-141413" />
<PackageReference Include="SD-JWT" Version="0.1.0-alpha.35" />
<PackageReference Include="Stateless" Version="$(StatelessVersion)" />
<PackageReference Include="System.Collections.Immutable" Version="1.7.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.1" />
Expand Down
Loading