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:
@@ -222,13 +222,23 @@ jobs:
|
||||
Push_Nuget_Package:
|
||||
needs: Build_Project
|
||||
runs-on: windows-2019
|
||||
env: NUSPECNAME
|
||||
env:
|
||||
NUSPECNAME: default
|
||||
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
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: Version
|
||||
- name: Set Version Number
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
shell: powershell
|
||||
run: |
|
||||
Get-ChildItem "./Version"
|
||||
@@ -238,26 +248,25 @@ jobs:
|
||||
Remove-Item -Path ./Version/version.txt
|
||||
Remove-Item -Path ./Version
|
||||
- name: Download Build output
|
||||
:if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: Build
|
||||
path: ./
|
||||
- name: Unzip Build file
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
run: |
|
||||
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
||||
Remove-Item -Path .\*.zip
|
||||
- name: Copy Files to root & delete output directory
|
||||
if: $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: 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
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
uses: nuget/setup-nuget@v1
|
||||
- name: Add Github Packages source
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
|
||||
@@ -170,13 +170,23 @@ jobs:
|
||||
Push_Nuget_Package:
|
||||
needs: Build_Project
|
||||
runs-on: windows-2019
|
||||
env: NUSPECNAME
|
||||
env:
|
||||
NUSPECNAME: default
|
||||
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
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: Version
|
||||
- name: Set Version Number
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
shell: powershell
|
||||
run: |
|
||||
Get-ChildItem "./Version"
|
||||
@@ -186,26 +196,25 @@ jobs:
|
||||
Remove-Item -Path ./Version/version.txt
|
||||
Remove-Item -Path ./Version
|
||||
- name: Download Build output
|
||||
:if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: Build
|
||||
path: ./
|
||||
- name: Unzip Build file
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
run: |
|
||||
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
||||
Remove-Item -Path .\*.zip
|
||||
- name: Copy Files to root & delete output directory
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
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 .\
|
||||
Remove-Item -Path .\output -Recurse
|
||||
# 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
|
||||
#Pushes to github nuget store
|
||||
- name: Add nuget.exe
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
uses: nuget/setup-nuget@v1
|
||||
- name: Add Github Packages source
|
||||
if: $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
@@ -223,4 +232,3 @@ jobs:
|
||||
- name: Publish nuget package to nuget.org
|
||||
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && $NUSPECNAME != 'PDT.EssentialsPluginTemplate'
|
||||
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
||||
|
||||
Reference in New Issue
Block a user