From 993011766859227a5d3936d974043b813ab02e15 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 16 Jun 2020 16:13:11 -0600 Subject: [PATCH 1/9] update gitignore and add files for nuget configuration --- .gitignore | 4 +++- .../Pepperdash Core/PepperDash_Core.nuspec | 20 +++++++++++++++++++ Pepperdash Core/Pepperdash Core/nuget.config | 12 +++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec create mode 100644 Pepperdash Core/Pepperdash Core/nuget.config diff --git a/.gitignore b/.gitignore index 9935935..4da46f9 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,6 @@ obj/ [Rr]elease*/ _ReSharper*/ SIMPLSharpLogs/ -*.projectinfo \ No newline at end of file +*.projectinfo +*.nupkg +lib/ diff --git a/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec b/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec new file mode 100644 index 0000000..9cd17da --- /dev/null +++ b/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec @@ -0,0 +1,20 @@ + + + + PepperDashCore + 1.0.37 + PepperDash Core + PepperDash Technologies + pepperdash + false + MIT + https://github.com/PepperDash/PepperDashCore + Copyright 2020 + Some text here + crestron 3series 4series + + + + + + \ No newline at end of file diff --git a/Pepperdash Core/Pepperdash Core/nuget.config b/Pepperdash Core/Pepperdash Core/nuget.config new file mode 100644 index 0000000..fe6a7ba --- /dev/null +++ b/Pepperdash Core/Pepperdash Core/nuget.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file From 4739356e6807acd7df057470ff5fa3be747b0274 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 16 Jun 2020 16:51:00 -0600 Subject: [PATCH 2/9] udpates docker to create nuget package --- .github/workflows/docker.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a05fde4..06c76cd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -62,6 +62,10 @@ jobs: shell: powershell run: | Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_PATH)\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)" + - name: Add nuget.exe + uses: nuget/setup-nuget@v1 + - name: Create nuget package + run: nuget pack "./Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec -version ${{ env.VERSION }} # Zip up the output files as needed - name: Zip Build Output shell: powershell From 090cf671e561df70b84865bc354e153508815963 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 16 Jun 2020 17:05:01 -0600 Subject: [PATCH 3/9] adds missing " --- .github/workflows/docker.yml | 2 +- Pepperdash Core/Pepperdash Core/nuget.config | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 Pepperdash Core/Pepperdash Core/nuget.config diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 06c76cd..3a1032f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -65,7 +65,7 @@ jobs: - name: Add nuget.exe uses: nuget/setup-nuget@v1 - name: Create nuget package - run: nuget pack "./Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec -version ${{ env.VERSION }} + run: nuget pack "./Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec" -version ${{ env.VERSION }} # Zip up the output files as needed - name: Zip Build Output shell: powershell diff --git a/Pepperdash Core/Pepperdash Core/nuget.config b/Pepperdash Core/Pepperdash Core/nuget.config deleted file mode 100644 index fe6a7ba..0000000 --- a/Pepperdash Core/Pepperdash Core/nuget.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file From b83a89a6f9f665742a92840d91c30c3990af435a Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 16 Jun 2020 17:22:09 -0600 Subject: [PATCH 4/9] adds nuget publish step --- .github/workflows/docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3a1032f..6f860ce 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -67,6 +67,8 @@ jobs: - name: Create nuget package run: nuget pack "./Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec" -version ${{ env.VERSION }} # Zip up the output files as needed + - name: Publish nuget package to Github registry + run: nuget push **/*.nupkg -source "https://nuget.pkg.github.com/pepperdash/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} - name: Zip Build Output shell: powershell run: ./.github/scripts/ZipBuildOutput.ps1 From d8317c4c703c04c55fe298f72a4b0e67ca019df8 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Sat, 20 Jun 2020 19:36:48 -0600 Subject: [PATCH 5/9] updates docker to add a job to create and push package --- .github/scripts/ZipBuildOutput.ps1 | 2 +- .github/workflows/docker.yml | 50 +++++++++++++++---- .../Pepperdash Core/PepperDash_Core.nuspec | 4 +- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/.github/scripts/ZipBuildOutput.ps1 b/.github/scripts/ZipBuildOutput.ps1 index 14cd92b..6e44736 100644 --- a/.github/scripts/ZipBuildOutput.ps1 +++ b/.github/scripts/ZipBuildOutput.ps1 @@ -10,7 +10,7 @@ Get-ChildItem ($destination) $exclusions = @(git submodule foreach --quiet 'echo $name') # Trying to get any .json schema files (not currently working) # Gets any files with the listed extensions. -Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.json" | ForEach-Object { +Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.json", "*.nuspec" | ForEach-Object { $allowed = $true; # Exclude any files in submodules foreach ($exclude in $exclusions) { diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6f860ce..adb497d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -61,14 +61,7 @@ jobs: - name: Build Solution shell: powershell run: | - Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_PATH)\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)" - - name: Add nuget.exe - uses: nuget/setup-nuget@v1 - - name: Create nuget package - run: nuget pack "./Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec" -version ${{ env.VERSION }} - # Zip up the output files as needed - - name: Publish nuget package to Github registry - run: nuget push **/*.nupkg -source "https://nuget.pkg.github.com/pepperdash/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} + Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_PATH)\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"" - name: Zip Build Output shell: powershell run: ./.github/scripts/ZipBuildOutput.ps1 @@ -115,7 +108,46 @@ jobs: asset_name: ${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip asset_content_type: application/zip env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} + Push_Nuget_Package: + needs: Build_Project + runs-on: windows-latest + steps: + - name: Download Build Version Info + uses: actions/download-artifact@v1 + with: + name: Version + - name: Set Version Number + shell: powershell + run: | + Get-ChildItem "./Version" + $version = Get-Content -Path ./Version/version.txt + Write-Host "Version: $version" + Write-Output "::set-env name=VERSION::$version" + Remove-Item -Path ./Version/version.txt + Remove-Item -Path ./Version + - name: Download Build output + uses: actions/download-artifact@v1 + with: + name: Build + path: ./ + - name: Unzip Build file + run: | + Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ + Remove-Item -Path .\*.zip + - name: Copy Files to root & delete output directory + run: | + Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") + Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ + Remove-Item -Path .\output -Recurse + - name: Add nuget.exe + uses: nuget/setup-nuget@v1 + - name: Add Github Packages source + run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} + - name: Create nuget package + run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }} + - name: Publish nuget package to Github registry + run: nuget push **/*.nupkg -source github # This step always runs and pushes the build to the internal build rep Internal_Push_Output: needs: Build_Project diff --git a/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec b/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec index 9cd17da..c6c6436 100644 --- a/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec +++ b/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec @@ -10,11 +10,11 @@ MIT https://github.com/PepperDash/PepperDashCore Copyright 2020 - Some text here + PepperDash Core is an open source Crestron SIMPL# library that can be used in SIMPL# Pro applications such as Essentials or as a standalone library with SIMPL+ wrappers to expose functionality in SIMPL Windows programs. crestron 3series 4series - + \ No newline at end of file From 2e9a3b01e7c52a384191365cb3602bac5eadbc9c Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Sat, 20 Jun 2020 19:41:04 -0600 Subject: [PATCH 6/9] Fix missing " --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index adb497d..bf0a9d4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -61,7 +61,7 @@ jobs: - name: Build Solution shell: powershell run: | - Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_PATH)\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"" + Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_PATH)\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)" - name: Zip Build Output shell: powershell run: ./.github/scripts/ZipBuildOutput.ps1 From 29a47ab3efbdc901587c2f9033acf3de7b3aae7e Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Sat, 20 Jun 2020 19:58:04 -0600 Subject: [PATCH 7/9] update master workflow to also publish package --- .github/workflows/master.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 9ce6473..eefdcde 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -84,6 +84,45 @@ jobs: asset_content_type: application/zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + Push_Nuget_Package: + needs: Build_Project + runs-on: windows-latest + steps: + - name: Download Build Version Info + uses: actions/download-artifact@v1 + with: + name: Version + - name: Set Version Number + shell: powershell + run: | + Get-ChildItem "./Version" + $version = Get-Content -Path ./Version/version.txt + Write-Host "Version: $version" + Write-Output "::set-env name=VERSION::$version" + Remove-Item -Path ./Version/version.txt + Remove-Item -Path ./Version + - name: Download Build output + uses: actions/download-artifact@v1 + with: + name: Build + path: ./ + - name: Unzip Build file + run: | + Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ + Remove-Item -Path .\*.zip + - name: Copy Files to root & delete output directory + run: | + Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") + Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ + Remove-Item -Path .\output -Recurse + - name: Add nuget.exe + uses: nuget/setup-nuget@v1 + - name: Add Github Packages source + run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} + - name: Create nuget package + run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }} + - name: Publish nuget package to Github registry + run: nuget push **/*.nupkg -source github Internal_Push_Output: needs: Build_Project runs-on: windows-latest From 8c0e27c981992ee68053d249b7b09f0aeee21714 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Sat, 20 Jun 2020 22:48:29 -0600 Subject: [PATCH 8/9] Add files to path to allow for targeting .NET 4.7 --- Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec | 1 + 1 file changed, 1 insertion(+) diff --git a/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec b/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec index c6c6436..dda2017 100644 --- a/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec +++ b/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec @@ -16,5 +16,6 @@ + \ No newline at end of file From 220254a052928ad97550fc34622902c0780de0b9 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Sun, 21 Jun 2020 00:13:23 -0600 Subject: [PATCH 9/9] fix nuspec for targeting net47 --- Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec b/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec index dda2017..59c0779 100644 --- a/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec +++ b/Pepperdash Core/Pepperdash Core/PepperDash_Core.nuspec @@ -16,6 +16,6 @@ - + \ No newline at end of file