mirror of
https://github.com/PepperDash/EssentialsPluginTemplate.git
synced 2026-02-15 20:54:40 +00:00
fix: Workflow Syntax
This commit is contained in:
@@ -222,13 +222,23 @@ jobs:
|
|||||||
Push_Nuget_Package:
|
Push_Nuget_Package:
|
||||||
needs: Build_Project
|
needs: Build_Project
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
env: NUSPECNAME
|
env:
|
||||||
|
NUSPECNAME: default
|
||||||
steps:
|
steps:
|
||||||
|
- 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
|
||||||
|
|
||||||
- name: Download Build Version Info
|
- name: Download Build Version Info
|
||||||
|
if: $NUSPECNAME != 'PDT.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: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
@@ -238,26 +248,25 @@ 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: $NUSPECNAME != 'PDT.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: $NUSPECNAME != 'PDT.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: $NUSPECNAME != 'PDT.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: Get nuget File
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$NUSPECNAME = Get-ChildItem *.nuspec -recurse
|
|
||||||
echo "NUSPEC_FILE=$($NUSPECNAME.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
- name: Add nuget.exe
|
- name: Add nuget.exe
|
||||||
|
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||||
uses: nuget/setup-nuget@v1
|
uses: nuget/setup-nuget@v1
|
||||||
- name: Add Github Packages source
|
- name: Add Github Packages source
|
||||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||||
|
|||||||
@@ -170,13 +170,23 @@ jobs:
|
|||||||
Push_Nuget_Package:
|
Push_Nuget_Package:
|
||||||
needs: Build_Project
|
needs: Build_Project
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
env: NUSPECNAME
|
env:
|
||||||
|
NUSPECNAME: default
|
||||||
steps:
|
steps:
|
||||||
|
- 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
|
||||||
|
|
||||||
- name: Download Build Version Info
|
- name: Download Build Version Info
|
||||||
|
if: $NUSPECNAME != 'PDT.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: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
@@ -186,26 +196,25 @@ 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: $NUSPECNAME != 'PDT.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: $NUSPECNAME != 'PDT.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: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||||
run: |
|
run: |
|
||||||
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz","*.md")
|
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: Get nuget File
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$NUSPECNAME = Get-ChildItem *.nuspec -recurse
|
|
||||||
echo "NUSPEC_FILE=$($NUSPECNAME.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
- name: Add nuget.exe
|
- name: Add nuget.exe
|
||||||
|
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||||
uses: nuget/setup-nuget@v1
|
uses: nuget/setup-nuget@v1
|
||||||
- name: Add Github Packages source
|
- name: Add Github Packages source
|
||||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||||
@@ -223,4 +232,3 @@ jobs:
|
|||||||
- name: Publish nuget package to nuget.org
|
- name: Publish nuget package to nuget.org
|
||||||
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && $NUSPECNAME != 'PDT.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