From 245922845d693abf83ba8744effadbcd161c6c3e Mon Sep 17 00:00:00 2001 From: Aabishkar KC Date: Fri, 17 Nov 2023 09:21:27 -0500 Subject: [PATCH] Update build workflow (#90) --- .../workflows/PackageManagerClientMSbuild.yml | 53 ++++++++++--------- README.md | 29 +++------- 2 files changed, 35 insertions(+), 47 deletions(-) diff --git a/.github/workflows/PackageManagerClientMSbuild.yml b/.github/workflows/PackageManagerClientMSbuild.yml index 7e882b4..0de9aa1 100644 --- a/.github/workflows/PackageManagerClientMSbuild.yml +++ b/.github/workflows/PackageManagerClientMSbuild.yml @@ -1,27 +1,30 @@ -# Build PackageManager Client using latest VS and DotNET +# Build PackageManager Client using msbuild name: PackageManagerClient-VS2022Build -on: [push] +on: [push, pull_request] jobs: - build: - runs-on: windows-2022 - steps: - - name: Checkout PackageManagerClient Repo - uses: actions/checkout@v2 - with: - path: PackageManagerClient - repository: DynamoDS/PackageManagerClient - - name: Setup Nuget.exe to use on VM - uses: nuget/setup-nuget@v1 - - name: Nuget Restore in PackageManagerClient solution - run: nuget restore $Env:GITHUB_WORKSPACE\PackageManagerClient\src\GregClient.sln - - name: Build PackageManagerClient with MSBuild - run: | - echo "***Continue with the build, Good luck developer!***" - cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64" - .\MSBuild.exe $Env:GITHUB_WORKSPACE\PackageManagerClient\src\GregClient.sln - # look for PackageManagerClient - - name: Navigate to PackageManagerClient Folder - run: | - cd "$Env:GITHUB_WORKSPACE\PackageManagerClient\bin\Debug" - echo "***Locating PackageManagerClient!***" - test ".\Greg.dll" && echo "PackageManagerClient exists!" + build: + runs-on: windows-2022 + steps: + - name: Checkout PackageManagerClient Repo + uses: actions/checkout@v4 + with: + path: PackageManagerClient + repository: DynamoDS/PackageManagerClient + - name: Setup nuget + uses: nuget/setup-nuget@v1.2 + - name: Setup msbuild + uses: microsoft/setup-msbuild@v1.3 + - name: Nuget Restore PackageManagerClient solution + run: nuget restore ${{ github.workspace }}\PackageManagerClient\src\GregClient.sln + - name: Build PackageManagerClient with MSBuild + run: | + Write-Output "***Continue with the build, Good luck developer!***" + msbuild ${{ github.workspace }}\PackageManagerClient\src\GregClient.sln + - name: Look for PackageManagerClient + run: | + Write-Output "***Locating PackageManagerClient!***" + if (Test-Path -Path "${{ github.workspace }}\PackageManagerClient\bin\Debug\net6.0\Greg.dll") { + Write-Output "PackageManagerClient exists!" + } else { + Write-Error "PackageManagerClient was not found!" + } diff --git a/README.md b/README.md index d6869c2..e95f2dc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ -![PackageManagerClient-VS2022Build](https://github.com/DynamoDS/PackageManagerClient/workflows/PackageManagerClient-VS2022Build/badge.svg) +[![Nuget](https://img.shields.io/nuget/v/Greg?logo=nuget)](https://www.nuget.org/packages/Greg/) + +[![PackageManagerClient-VS2022Build](https://github.com/DynamoDS/PackageManagerClient/actions/workflows/PackageManagerClientMSbuild.yml/badge.svg)](https://github.com/DynamoDS/PackageManagerClient/actions/workflows/PackageManagerClientMSbuild.yml) + + # Dynamo Package Manager Client -This repo is the package manager client for the Dynamo Package Manager. Package Manager Client is designed to cover all of the capabilities of the Dynamo Package Manager. +This repo is the package manager client for the Dynamo Package Manager. Package Manager Client is designed to cover all of the capabilities of the Dynamo Package Manager. #### The Package Manager Client can do the following for you: @@ -25,7 +29,7 @@ This repo is the package manager client for the Dynamo Package Manager. Package - From Visual Studio IDE: - Build `The PackageManagerClient\src\GregClient.sln` solution + Build the `PackageManagerClient\src\GregClient.sln` solution - From command line: @@ -33,25 +37,6 @@ This repo is the package manager client for the Dynamo Package Manager. Package nuget restore src\GregClient.sln msbuild src\GregClient.sln ``` - -#### Nuget -The Package Manager Client is available from NuGet [here](https://www.nuget.org/packages/Greg/). - -#### Manual Build of the NugetPackage -- Make sure you have Nuget version 4.9.0 or later. ->**Important Note:** Please avoid to publish a locally built package - -##### Steps: - -1. Build the solution -2. On the repository directory, execute the following PowerShell script with the following parameters - ```bat - pwsh -ExecutionPolicy ByPass -File ".\nuspec\ManualBuildPackage.ps1 [REPOSITORY_PATH] [NUGET_EXE_PATH] [OUTPUT_PATH]" - ``` - - **REPOSITORY_PATH** Absolute path of the repository (e.g. c:\Workspace) - - **NUGET_EXE_PATH** Full path of the Nuget CLI executable (e.g. C:\Tools\nuget.exe) - - **OUTPUT_PATH** Output path of the nuget package generated (e.g. c:\Workspace\output) - ___ The Dynamo Package Manager and the Dynamo Package Manager Client both comply with the [Autodesk Privacy Policy](https://www.autodesk.com/company/legal-notices-trademarks/privacy-statement).