added logic to get version from previous step

This commit is contained in:
Andrew Welker
2020-03-17 14:16:30 -06:00
parent c80aa71208
commit bba2838936
2 changed files with 18 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include @("*.clz", "*.c
} | Copy-Item -Destination ($destination) } | Copy-Item -Destination ($destination)
Get-ChildItem "$($Env:GITHUB_WORKSPACE)\output" -include @("*.cpz", "*.clz", "*.cplz") | ForEach-Object { Get-ChildItem "$($Env:GITHUB_WORKSPACE)\output" -include @("*.cpz", "*.clz", "*.cplz") | ForEach-Object {
$filenames = @($_ -replace "cpz|clz|cplz", "dll", $_ -replace "cpz|clz|cplz", "xml") $filenames = @($_ -replace "cpz|clz|cplz", "dll", $_ -replace "cpz|clz|cplz", "xml")
if($filenames.length > 0) { if ($filenames.length -gt 0) {
Get-ChildItem -Recurse -Path "$($Env:GITHUB_WORKSPACE)" -include $filenames | Copy-Item -Destination ($destination) Get-ChildItem -Recurse -Path "$($Env:GITHUB_WORKSPACE)" -include $filenames | Copy-Item -Destination ($destination)
} }
} }

View File

@@ -97,12 +97,22 @@ jobs:
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: Build name: Build
path: ./build.zip
- name: Download Version info - name: Download Version info
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: Version name: Version
path: ./version.zip
- name: Set Version Number
run: |
Expand-Archive -Path ./version.zip -DestinationPath ./
$version = Get-Content -Path ./version.txt
Write-Output "::set-env name=VERSION::$version"
Remove-Item -Path ./version.zip
Remove-Item -Path ./version.txt
- name: Check Directory - name: Check Directory
run: Get-ChildItem ${{env.GITHUB_WORKSPACE}} run: |
Get-ChildItem ./
# public_push_output: # public_push_output:
# needs: build_project # needs: build_project
# runs-on: windows-latest # runs-on: windows-latest