mirror of
https://github.com/PepperDash/EssentialsPluginTemplate.git
synced 2026-01-11 19:44:38 +00:00
fix: Workflow Syntax
This commit is contained in:
@@ -232,12 +232,12 @@ jobs:
|
|||||||
echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV
|
echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV
|
||||||
echo "NUSPEC_FILE=$($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
|
- name: Download Build Version Info
|
||||||
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate '}}
|
if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')"
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: Version
|
name: Version
|
||||||
- name: Set Version Number
|
- name: Set Version Number
|
||||||
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')"
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
@@ -247,39 +247,39 @@ jobs:
|
|||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./Version/version.txt
|
||||||
Remove-Item -Path ./Version
|
Remove-Item -Path ./Version
|
||||||
- name: Download Build output
|
- name: Download Build output
|
||||||
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')"
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: Build
|
||||||
path: ./
|
path: ./
|
||||||
- name: Unzip Build file
|
- name: Unzip Build file
|
||||||
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')"
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
||||||
Remove-Item -Path .\*.zip
|
Remove-Item -Path .\*.zip
|
||||||
- name: Copy Files to root & delete output directory
|
- name: Copy Files to root & delete output directory
|
||||||
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')"
|
||||||
run: |
|
run: |
|
||||||
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
||||||
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
||||||
Remove-Item -Path .\output -Recurse
|
Remove-Item -Path .\output -Recurse
|
||||||
#Pushes to github nuget store
|
#Pushes to github nuget store
|
||||||
- name: Add nuget.exe
|
- name: Add nuget.exe
|
||||||
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
if: "!contains(env.NUSPECNAME, 'EssentialsPluginTemplate')"
|
||||||
uses: nuget/setup-nuget@v1
|
uses: nuget/setup-nuget@v1
|
||||||
- name: Add Github Packages source
|
- 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 }}
|
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, not needed unless publishing publicly
|
||||||
- name: Add nuget.org API Key
|
- 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 }}
|
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
||||||
- name: Create nuget package
|
- 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 }}
|
run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }}
|
||||||
- name: Publish nuget package to Github registry
|
- 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
|
run: nuget push **/*.nupkg -source github
|
||||||
- name: Publish nuget package to nuget.org
|
- 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
|
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
||||||
|
|||||||
Reference in New Issue
Block a user