From 87872b78e28ac5a037a6e195fff618e4a420401e Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Wed, 20 Jul 2022 17:29:57 -0500 Subject: [PATCH 01/11] fix: Workflow Syntax --- .github/workflows/essentialsplugins-betabuilds.yml | 2 +- .github/workflows/essentialsplugins-releasebuilds.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/essentialsplugins-betabuilds.yml b/.github/workflows/essentialsplugins-betabuilds.yml index 4dcf064..4a52ae5 100644 --- a/.github/workflows/essentialsplugins-betabuilds.yml +++ b/.github/workflows/essentialsplugins-betabuilds.yml @@ -229,7 +229,7 @@ jobs: shell: powershell run: | $nuspec = Get-ChildItem *.nuspec -recurse - $NUSPECNAME = nuspec.BaseName + $NUSPECNAME = $nuspec.BaseName echo "NUSPEC_FILE=$($NUSPECNAME)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info diff --git a/.github/workflows/essentialsplugins-releasebuilds.yml b/.github/workflows/essentialsplugins-releasebuilds.yml index c5bd360..45ee9db 100644 --- a/.github/workflows/essentialsplugins-releasebuilds.yml +++ b/.github/workflows/essentialsplugins-releasebuilds.yml @@ -177,7 +177,7 @@ jobs: shell: powershell run: | $nuspec = Get-ChildItem *.nuspec -recurse - $NUSPECNAME = nuspec.BaseName + $NUSPECNAME = $nuspec.BaseName echo "NUSPEC_FILE=$($NUSPECNAME)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info From 856178d920e5dff018ed6c484214aa78bece3a3d Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Wed, 20 Jul 2022 17:53:48 -0500 Subject: [PATCH 02/11] fix: Workflow Syntax --- .github/workflows/essentialsplugins-betabuilds.yml | 6 +++--- .github/workflows/essentialsplugins-releasebuilds.yml | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/essentialsplugins-betabuilds.yml b/.github/workflows/essentialsplugins-betabuilds.yml index 4a52ae5..3dd9b81 100644 --- a/.github/workflows/essentialsplugins-betabuilds.yml +++ b/.github/workflows/essentialsplugins-betabuilds.yml @@ -228,9 +228,9 @@ jobs: - name: Get nuget File shell: powershell run: | - $nuspec = Get-ChildItem *.nuspec -recurse - $NUSPECNAME = $nuspec.BaseName - echo "NUSPEC_FILE=$($NUSPECNAME)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + $nuspec_file = Get-ChildItem *.nuspec -recurse + env.NUSPECNAME = $($nuspec_file.BaseName) + echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} diff --git a/.github/workflows/essentialsplugins-releasebuilds.yml b/.github/workflows/essentialsplugins-releasebuilds.yml index 45ee9db..3cf0c26 100644 --- a/.github/workflows/essentialsplugins-releasebuilds.yml +++ b/.github/workflows/essentialsplugins-releasebuilds.yml @@ -176,10 +176,9 @@ jobs: - name: Get nuget File shell: powershell run: | - $nuspec = Get-ChildItem *.nuspec -recurse - $NUSPECNAME = $nuspec.BaseName - echo "NUSPEC_FILE=$($NUSPECNAME)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - + $nuspec_file = Get-ChildItem *.nuspec -recurse + env.NUSPECNAME = $($nuspec_file.BaseName) + echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} uses: actions/download-artifact@v1 From 3d57ac3560ffa242c097ba194df73be96e0d78b3 Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Wed, 20 Jul 2022 18:18:07 -0500 Subject: [PATCH 03/11] fix: Workflow Syntax --- .../essentialsplugins-betabuilds.yml | 25 +++++++++---------- .../essentialsplugins-releasebuilds.yml | 24 +++++++++--------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/.github/workflows/essentialsplugins-betabuilds.yml b/.github/workflows/essentialsplugins-betabuilds.yml index 3dd9b81..cfcea42 100644 --- a/.github/workflows/essentialsplugins-betabuilds.yml +++ b/.github/workflows/essentialsplugins-betabuilds.yml @@ -229,16 +229,15 @@ jobs: shell: powershell run: | $nuspec_file = Get-ChildItem *.nuspec -recurse - env.NUSPECNAME = $($nuspec_file.BaseName) + ${{ env.NUSPECNAME }} = $($nuspec_file.BaseName) echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - name: Download Build Version Info - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate '}} uses: actions/download-artifact@v1 with: name: Version - name: Set Version Number - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} shell: powershell run: | Get-ChildItem "./Version" @@ -248,39 +247,39 @@ jobs: Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version - name: Download Build output - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} uses: actions/download-artifact@v1 with: name: Build path: ./ - name: Unzip Build file - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: | Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ Remove-Item -Path .\*.zip - name: Copy Files to root & delete output directory - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: | Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ Remove-Item -Path .\output -Recurse #Pushes to github nuget store - name: Add nuget.exe - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} uses: nuget/setup-nuget@v1 - name: Add Github Packages source - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} # Pushes to nuget gallery, not needed unless publishing publicly - name: Add nuget.org API Key - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - name: Create nuget package - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget push **/*.nupkg -source github - name: Publish nuget package to nuget.org - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json diff --git a/.github/workflows/essentialsplugins-releasebuilds.yml b/.github/workflows/essentialsplugins-releasebuilds.yml index 3cf0c26..c6837a4 100644 --- a/.github/workflows/essentialsplugins-releasebuilds.yml +++ b/.github/workflows/essentialsplugins-releasebuilds.yml @@ -177,15 +177,15 @@ jobs: shell: powershell run: | $nuspec_file = Get-ChildItem *.nuspec -recurse - env.NUSPECNAME = $($nuspec_file.BaseName) + ${{ env.NUSPECNAME }} = $($nuspec_file.BaseName) echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate '}} uses: actions/download-artifact@v1 with: name: Version - name: Set Version Number - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} shell: powershell run: | Get-ChildItem "./Version" @@ -195,39 +195,39 @@ jobs: Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version - name: Download Build output - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} uses: actions/download-artifact@v1 with: name: Build path: ./ - name: Unzip Build file - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: | Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ Remove-Item -Path .\*.zip - name: Copy Files to root & delete output directory - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: | Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ Remove-Item -Path .\output -Recurse #Pushes to github nuget store - name: Add nuget.exe - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} uses: nuget/setup-nuget@v1 - name: Add Github Packages source - if: ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} # Pushes to nuget gallery, not needed unless publishing publicly - name: Add nuget.org API Key - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - name: Create nuget package - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget push **/*.nupkg -source github - name: Publish nuget package to nuget.org - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{env.NUSPECNAME != 'PDT.EssentialsPluginTemplate'}} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json From 1add0c193ce57acb9e147534398b5fad75c8d765 Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Wed, 20 Jul 2022 18:34:20 -0500 Subject: [PATCH 04/11] fix: Workflow Syntax --- .github/workflows/essentialsplugins-betabuilds.yml | 2 +- .github/workflows/essentialsplugins-releasebuilds.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/essentialsplugins-betabuilds.yml b/.github/workflows/essentialsplugins-betabuilds.yml index cfcea42..56515c2 100644 --- a/.github/workflows/essentialsplugins-betabuilds.yml +++ b/.github/workflows/essentialsplugins-betabuilds.yml @@ -229,7 +229,7 @@ jobs: shell: powershell run: | $nuspec_file = Get-ChildItem *.nuspec -recurse - ${{ env.NUSPECNAME }} = $($nuspec_file.BaseName) + echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate '}} diff --git a/.github/workflows/essentialsplugins-releasebuilds.yml b/.github/workflows/essentialsplugins-releasebuilds.yml index c6837a4..eab1043 100644 --- a/.github/workflows/essentialsplugins-releasebuilds.yml +++ b/.github/workflows/essentialsplugins-releasebuilds.yml @@ -177,7 +177,7 @@ jobs: shell: powershell run: | $nuspec_file = Get-ChildItem *.nuspec -recurse - ${{ env.NUSPECNAME }} = $($nuspec_file.BaseName) + echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate '}} From f08741efd6ae61486bfd16419c9fc92d15c3382f Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Wed, 20 Jul 2022 20:32:42 -0500 Subject: [PATCH 05/11] fix: Workflow Syntax --- .../essentialsplugins-releasebuilds.yml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/essentialsplugins-releasebuilds.yml b/.github/workflows/essentialsplugins-releasebuilds.yml index eab1043..4be26b4 100644 --- a/.github/workflows/essentialsplugins-releasebuilds.yml +++ b/.github/workflows/essentialsplugins-releasebuilds.yml @@ -180,12 +180,12 @@ jobs: echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate '}} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: actions/download-artifact@v1 with: name: Version - name: Set Version Number - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" shell: powershell run: | Get-ChildItem "./Version" @@ -195,39 +195,39 @@ jobs: Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version - name: Download Build output - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: actions/download-artifact@v1 with: name: Build path: ./ - name: Unzip Build file - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: | Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ Remove-Item -Path .\*.zip - name: Copy Files to root & delete output directory - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: | Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ Remove-Item -Path .\output -Recurse #Pushes to github nuget store - name: Add nuget.exe - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: nuget/setup-nuget@v1 - name: Add Github Packages source - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} # Pushes to nuget gallery, not needed unless publishing publicly - name: Add nuget.org API Key - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - name: Create nuget package - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget push **/*.nupkg -source github - name: Publish nuget package to nuget.org - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json From af7e9ae659a367e05498a4f265dc7c94194a03aa Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Wed, 20 Jul 2022 21:03:26 -0500 Subject: [PATCH 06/11] fix: Workflow Syntax --- .../essentialsplugins-betabuilds.yml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/essentialsplugins-betabuilds.yml b/.github/workflows/essentialsplugins-betabuilds.yml index 56515c2..90374b7 100644 --- a/.github/workflows/essentialsplugins-betabuilds.yml +++ b/.github/workflows/essentialsplugins-betabuilds.yml @@ -232,12 +232,12 @@ jobs: echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate '}} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: actions/download-artifact@v1 with: name: Version - name: Set Version Number - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" shell: powershell run: | Get-ChildItem "./Version" @@ -247,39 +247,39 @@ jobs: Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version - name: Download Build output - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: actions/download-artifact@v1 with: name: Build path: ./ - name: Unzip Build file - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: | Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ Remove-Item -Path .\*.zip - name: Copy Files to root & delete output directory - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: | Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ Remove-Item -Path .\output -Recurse #Pushes to github nuget store - name: Add nuget.exe - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: nuget/setup-nuget@v1 - name: Add Github Packages source - if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} # Pushes to nuget gallery, not needed unless publishing publicly - name: Add nuget.org API Key - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - name: Create nuget package - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget push **/*.nupkg -source github - name: Publish nuget package to nuget.org - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }} + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json From ee057ad3618faf378e6db98fdb24fc14b6fdebd1 Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Wed, 20 Jul 2022 21:47:09 -0500 Subject: [PATCH 07/11] fix: Workflow Syntax --- .github/workflows/essentialsplugins-betabuilds.yml | 8 ++++---- .github/workflows/essentialsplugins-releasebuilds.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/essentialsplugins-betabuilds.yml b/.github/workflows/essentialsplugins-betabuilds.yml index 90374b7..f3f4657 100644 --- a/.github/workflows/essentialsplugins-betabuilds.yml +++ b/.github/workflows/essentialsplugins-betabuilds.yml @@ -272,14 +272,14 @@ jobs: run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} # Pushes to nuget gallery, not needed unless publishing publicly - name: Add nuget.org API Key - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - name: Create nuget package - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget push **/*.nupkg -source github - name: Publish nuget package to nuget.org - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json diff --git a/.github/workflows/essentialsplugins-releasebuilds.yml b/.github/workflows/essentialsplugins-releasebuilds.yml index 4be26b4..869ddf9 100644 --- a/.github/workflows/essentialsplugins-releasebuilds.yml +++ b/.github/workflows/essentialsplugins-releasebuilds.yml @@ -220,14 +220,14 @@ jobs: run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} # Pushes to nuget gallery, not needed unless publishing publicly - name: Add nuget.org API Key - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - name: Create nuget package - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget push **/*.nupkg -source github - name: Publish nuget package to nuget.org - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json From 62912451e8757568180f937c4c67c5979fa0ceb3 Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Wed, 20 Jul 2022 22:15:48 -0500 Subject: [PATCH 08/11] fix: Workflow Syntax --- .github/workflows/essentialsplugins-betabuilds.yml | 4 ++-- .github/workflows/essentialsplugins-releasebuilds.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/essentialsplugins-betabuilds.yml b/.github/workflows/essentialsplugins-betabuilds.yml index f3f4657..c2df4dc 100644 --- a/.github/workflows/essentialsplugins-betabuilds.yml +++ b/.github/workflows/essentialsplugins-betabuilds.yml @@ -229,8 +229,8 @@ jobs: shell: powershell run: | $nuspec_file = Get-ChildItem *.nuspec -recurse - echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV - echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "NUSPECNAME=$($nuspec_file.BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "NUSPEC_FILE=$($nuspec_file.BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: actions/download-artifact@v1 diff --git a/.github/workflows/essentialsplugins-releasebuilds.yml b/.github/workflows/essentialsplugins-releasebuilds.yml index 869ddf9..be6aed4 100644 --- a/.github/workflows/essentialsplugins-releasebuilds.yml +++ b/.github/workflows/essentialsplugins-releasebuilds.yml @@ -177,8 +177,8 @@ jobs: shell: powershell run: | $nuspec_file = Get-ChildItem *.nuspec -recurse - echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV - echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "NUSPECNAME=$($nuspec_file.BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "NUSPEC_FILE=$($nuspec_file.BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: actions/download-artifact@v1 From 62f959bb259cd8159d60c4b0bfed97d303ae3bec Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Thu, 21 Jul 2022 10:17:56 -0500 Subject: [PATCH 09/11] test workflow syntax --- .../essentialsplugins-betabuilds.yml | 20 +++--- .../essentialsplugins-releasebuilds.yml | 61 ++++++++++++++++++- 2 files changed, 68 insertions(+), 13 deletions(-) diff --git a/.github/workflows/essentialsplugins-betabuilds.yml b/.github/workflows/essentialsplugins-betabuilds.yml index c2df4dc..fa3e21c 100644 --- a/.github/workflows/essentialsplugins-betabuilds.yml +++ b/.github/workflows/essentialsplugins-betabuilds.yml @@ -225,19 +225,11 @@ jobs: env: NUSPECNAME: default steps: - - name: Get nuget File - shell: powershell - run: | - $nuspec_file = Get-ChildItem *.nuspec -recurse - echo "NUSPECNAME=$($nuspec_file.BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - echo "NUSPEC_FILE=$($nuspec_file.BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Build Version Info - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: actions/download-artifact@v1 with: name: Version - name: Set Version Number - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" shell: powershell run: | Get-ChildItem "./Version" @@ -247,22 +239,26 @@ jobs: Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version - name: Download Build output - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" uses: actions/download-artifact@v1 with: name: Build path: ./ - name: Unzip Build file - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: | Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ Remove-Item -Path .\*.zip - name: Copy Files to root & delete output directory - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: | Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ Remove-Item -Path .\output -Recurse + - name: Get nuget File + shell: powershell + run: | + $nuspec_file = (Get-ChildItem *.nuspec -recurse).BaseName + echo "NUSPECNAME=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "NUSPEC_FILE=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + #Pushes to github nuget store - name: Add nuget.exe if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" @@ -270,7 +266,7 @@ jobs: - name: Add Github Packages source if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} - # Pushes to nuget gallery, not needed unless publishing publicly + # Pushes to nuget gallery - name: Add nuget.org API Key if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} diff --git a/.github/workflows/essentialsplugins-releasebuilds.yml b/.github/workflows/essentialsplugins-releasebuilds.yml index be6aed4..18b3771 100644 --- a/.github/workflows/essentialsplugins-releasebuilds.yml +++ b/.github/workflows/essentialsplugins-releasebuilds.yml @@ -167,7 +167,6 @@ jobs: asset_content_type: application/zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - Push_Nuget_Package: needs: Build_Project runs-on: windows-2019 env: @@ -231,3 +230,63 @@ jobs: - name: Publish nuget package to nuget.org if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json + Push_Nuget_Package: + needs: Build_Project + runs-on: windows-2019 + env: + NUSPECNAME: default + 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" + echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + 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: Get nuget File + shell: powershell + run: | + $nuspec_file = (Get-ChildItem *.nuspec -recurse).BaseName + echo "NUSPECNAME=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "NUSPEC_FILE=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + #Pushes to github nuget store + - name: Add nuget.exe + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + uses: nuget/setup-nuget@v1 + - name: Add Github Packages source + if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} + # Pushes to nuget gallery + - name: Add nuget.org API Key + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') + run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} + - name: Create nuget package + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') + run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} + - name: Publish nuget package to Github registry + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') + run: nuget push **/*.nupkg -source github + - name: Publish nuget package to nuget.org + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') + run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json From 259a71c562f1e0c939548e71ae2313de314985c3 Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Thu, 21 Jul 2022 12:07:27 -0500 Subject: [PATCH 10/11] style: renamed classes for consistency build: updated essentials version ci: updated workflows docs: documentation updated ci: updated nuspec --- .../essentialsplugins-betabuilds.yml | 30 +++--- .../essentialsplugins-releasebuilds.yml | 91 +++---------------- README.md | 16 ++-- 3 files changed, 37 insertions(+), 100 deletions(-) diff --git a/.github/workflows/essentialsplugins-betabuilds.yml b/.github/workflows/essentialsplugins-betabuilds.yml index fa3e21c..3b42815 100644 --- a/.github/workflows/essentialsplugins-betabuilds.yml +++ b/.github/workflows/essentialsplugins-betabuilds.yml @@ -153,7 +153,7 @@ jobs: $exclusions = "packages" # 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", "*.nuspec" | ForEach-Object { + Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.nuspec", "*.md" | ForEach-Object { $allowed = $true; # Exclude any files in submodules foreach ($exclude in $exclusions) { @@ -222,8 +222,6 @@ jobs: Push_Nuget_Package: needs: Build_Project runs-on: windows-2019 - env: - NUSPECNAME: default steps: - name: Download Build Version Info uses: actions/download-artifact@v1 @@ -256,26 +254,26 @@ jobs: shell: powershell run: | $nuspec_file = (Get-ChildItem *.nuspec -recurse).BaseName - echo "NUSPECNAME=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "NUSPEC_FILE=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - #Pushes to github nuget store + # Pulls the nuget builder packages - name: Add nuget.exe - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')" uses: nuget/setup-nuget@v1 + # Creating nuget Packages - name: Add Github Packages source - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')" 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 + if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')" + run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} + # Pushes to internal github registry + - name: Publish nuget package to Github registry + if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')" + run: nuget push **/*.nupkg -source github # Pushes to nuget gallery - name: Add nuget.org API Key - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate') run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - - name: Create nuget package - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') - run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} - - name: Publish nuget package to Github registry - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') - run: nuget push **/*.nupkg -source github - name: Publish nuget package to nuget.org - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate') run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json diff --git a/.github/workflows/essentialsplugins-releasebuilds.yml b/.github/workflows/essentialsplugins-releasebuilds.yml index 18b3771..2ae1117 100644 --- a/.github/workflows/essentialsplugins-releasebuilds.yml +++ b/.github/workflows/essentialsplugins-releasebuilds.yml @@ -167,74 +167,9 @@ jobs: asset_content_type: application/zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - needs: Build_Project - runs-on: windows-2019 - env: - NUSPECNAME: default - steps: - - name: Get nuget File - shell: powershell - run: | - $nuspec_file = Get-ChildItem *.nuspec -recurse - echo "NUSPECNAME=$($nuspec_file.BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - echo "NUSPEC_FILE=$($nuspec_file.BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - name: Download Build Version Info - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" - uses: actions/download-artifact@v1 - with: - name: Version - - name: Set Version Number - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" - shell: powershell - run: | - Get-ChildItem "./Version" - $version = Get-Content -Path ./Version/version.txt - Write-Host "Version: $version" - echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - Remove-Item -Path ./Version/version.txt - Remove-Item -Path ./Version - - name: Download Build output - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" - uses: actions/download-artifact@v1 - with: - name: Build - path: ./ - - name: Unzip Build file - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" - run: | - Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\ - Remove-Item -Path .\*.zip - - name: Copy Files to root & delete output directory - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" - run: | - Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz") - Get-ChildItem -Path .\output\* | Copy-Item -Destination .\ - Remove-Item -Path .\output -Recurse - #Pushes to github nuget store - - name: Add nuget.exe - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" - uses: nuget/setup-nuget@v1 - - name: Add Github Packages source - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" - run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} - # Pushes to nuget gallery, not needed unless publishing publicly - - name: Add nuget.org API Key - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') - run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - - name: Create nuget package - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') - run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} - - name: Publish nuget package to Github registry - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') - run: nuget push **/*.nupkg -source github - - name: Publish nuget package to nuget.org - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') - run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json Push_Nuget_Package: needs: Build_Project runs-on: windows-2019 - env: - NUSPECNAME: default steps: - name: Download Build Version Info uses: actions/download-artifact@v1 @@ -267,26 +202,26 @@ jobs: shell: powershell run: | $nuspec_file = (Get-ChildItem *.nuspec -recurse).BaseName - echo "NUSPECNAME=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "NUSPEC_FILE=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - #Pushes to github nuget store + # Pulls the nuget builder packages - name: Add nuget.exe - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')" uses: nuget/setup-nuget@v1 + # Creating nuget Packages - name: Add Github Packages source - if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')" + if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')" 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 + if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')" + run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} + # Pushes to internal github registry + - name: Publish nuget package to Github registry + if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')" + run: nuget push **/*.nupkg -source github # Pushes to nuget gallery - name: Add nuget.org API Key - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate') run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - - name: Create nuget package - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') - run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }} - - name: Publish nuget package to Github registry - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') - run: nuget push **/*.nupkg -source github - name: Publish nuget package to nuget.org - if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPECNAME, 'EssentialsPluginTemplate') + if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate') run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json diff --git a/README.md b/README.md index 8dfb905..d115b04 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ The [Essentials](https://github.com/PepperDash/Essentials) libraries are require To install dependencies once nuget.exe is installed, run the following command from the root directory of your repository: `nuget install .\packages.config -OutputDirectory .\packages -excludeVersion`. +Alternatively, you can simply run the `GetPackages.bat` file. To verify that the packages installed correctly, open the plugin solution in your repo and make sure that all references are found, then try and build it. ### Installing Different versions of PepperDash Core @@ -37,7 +38,7 @@ If you need a different version of PepperDash Core, use the command `nuget insta ### Instructions for Renaming Solution and Files -See the Task List in Visual Studio for a guide on how to start using the templage. There is extensive inline documentation and examples as well. +See the Task List in Visual Studio for a guide on how to start using the template. There is extensive inline documentation and examples as well. For renaming instructions in particular, see the XML `remarks` tags on class definitions @@ -45,10 +46,13 @@ For renaming instructions in particular, see the XML `remarks` tags on class def ## Generating Nuget Package -In the solution folder is a file named "PDT.EssentialsPluginTemplate.nuspec-TEMPLATE" +In the solution folder is a file named "PDT.EssentialsPluginTemplate.nuspec" -1. Remove the -TEMPLATE so that the extention is .nuspec. -2. Rename the file to match your plugin solution name -3. Edit the file to include your project specifics including +1. Rename the file to match your plugin solution name +2. Edit the file to include your project specifics including 1. PepperDash.Essentials.Plugin.MakeModel Convention is to use the prefix "PepperDash.Essentials.Plugin" and include the MakeModel of the device. - 2. https://github.com/PepperDash/EssentialsPluginTemplate Change to your url to the project repo \ No newline at end of file + 2. https://github.com/PepperDash/EssentialsPluginTemplate Change to your url to the project repo + +There is no longer a requirement to adjust workflow files for nuget generation for private and public repositories. This is now handled automatically in the workflow. + +__If you do not make these changes to the nuspec file, the project will not generate a nuget package__ \ No newline at end of file From 2586e9502dd77d578b14b0ad221a8cfb765ca824 Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Tue, 26 Sep 2023 08:57:39 -0500 Subject: [PATCH 11/11] Create essentialsplugins-betabuilds-caller.yml --- .../essentialsplugins-betabuilds-caller.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/essentialsplugins-betabuilds-caller.yml diff --git a/.github/workflows/essentialsplugins-betabuilds-caller.yml b/.github/workflows/essentialsplugins-betabuilds-caller.yml new file mode 100644 index 0000000..8ca618c --- /dev/null +++ b/.github/workflows/essentialsplugins-betabuilds-caller.yml @@ -0,0 +1,22 @@ +name: Beta Build + +on: + push: + branches-ignore: + - "main" + + workflow_dispatch: + inputs: + branch: + description: 'Branch to build' + required: true + type: string + +jobs: + call-workflow: + uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-builds.yml@main + secrets: inherit + with: + branch: ${{ github.ref_name }} + default-branch: "main" +