Skip to content

Commit

Permalink
pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Tuerk <[email protected]>
  • Loading branch information
Johannes Tuerk committed Dec 13, 2023
1 parent d76d253 commit 620e5a1
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 49 deletions.
95 changes: 46 additions & 49 deletions .github/workflows/publish-nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,61 @@ name: CI
on:
push:
branches:
- setup-cicd-pipeline
- setup-cicd-pipeline
pull_request:
branches:
- setup-cicd-pipeline
- setup-cicd-pipeline


env:
MAJOR: 0
MINOR: 1
PATCH: 0
APP_VERSION: v$(MAJOR).$(MINOR).$(PATCH)
BUILD_CONFIG: 'Release'
SOLUTION: 'src/Hyperledger.Aries.sln'
#IS_PULL_REQUEST: ${{ github.ref == 'refs/pull/.../merge' }}
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
IS_MAIN_BRANCH: ${{ github.ref == 'refs/heads/main' }}
IS_DEV_BRANCH: ${{ github.ref == 'refs/heads/develop' }}
IS_RELEASE_BRANCH: ${{ github.ref == 'refs/heads/release' }}

jobs:
MAJOR: '0'
MINOR: '1'
PATCH: '0'

# build_number:
# name: Set Build Number
#
# runs-on: ubuntu-latest
#
# steps:
# - name: Check bats version
# run: bats --version

jobs:
build:
name: Build
needs: build_number


runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup NuGet
uses: NuGet/setup-nuget@v1
- uses: actions/checkout@v2

- name: Set Version
run: |
if $IS_MAIN_BRANCH; then
SUFFIX="rc"
elif $IS_PULL_REQUEST; then
SUFFIX="alpha"
fi
echo "APP_VERSION=$MAJOR.$MINOR.$PATCH-$SUFFIX.${{ github.run_number }}" >> $GITHUB_ENV
- name: Version
run: echo $APP_VERSION

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

- name: Configure NuGet sources
run: |
nuget sources add -name SD-JWT -source https://pkgs.dev.azure.com/mi-lissi/OID4VC/_packaging/lissi-oid4vc/nuget/v3/index.json
- name: Restore dependencies
run: nuget restore $SOLUTION

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

- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore

#- name: Run tests
#run: dotnet test /p:Configuration=$env:BUILD_CONFIG --no-restore --no-build --verbosity normal

#- name: Publish
#run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
- name: Restore dependencies
run: nuget restore $SOLUTION

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

- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG -p:Version=$APP_VERSION --no-restore

- name: Run tests
run: dotnet test /p:Configuration=$BUILD_CONFIG --no-restore --no-build --verbosity normal

- name: Pack WalletFramework.Core
run: dotnet pack /p: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}}


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>
<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
1 change: 1 addition & 0 deletions 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 Down

0 comments on commit 620e5a1

Please sign in to comment.