From 82ddd4095359dfd23b8d6b47b24982f0f7d87bb9 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 24 Mar 2020 16:55:20 -0600 Subject: [PATCH] adds logic to rename .cpz to add version... ...& points to different repo for create release action --- .github/scripts/ZipBuildOutput.ps1 | 4 +++- .github/workflows/docker.yml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/scripts/ZipBuildOutput.ps1 b/.github/scripts/ZipBuildOutput.ps1 index 3f1998bb..ac87aeb7 100644 --- a/.github/scripts/ZipBuildOutput.ps1 +++ b/.github/scripts/ZipBuildOutput.ps1 @@ -26,7 +26,7 @@ Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz } | Copy-Item -Destination ($destination) -Force Write-Host "Getting matching files..." # Get any files from the output folder that match the following extensions -Get-ChildItem -Path $destination | Where-Object {($_.Extension -eq ".clz") -or ($_.Extension -eq ".cpz" -or ($_.Extension -eq ".cplz"))} | ForEach-Object { +Get-ChildItem -Path $destination | Where-Object { ($_.Extension -eq ".clz") -or ($_.Extension -eq ".cpz" -or ($_.Extension -eq ".cplz")) } | ForEach-Object { # Replace the extensions with dll and xml and create an array $filenames = @($($_ -replace "cpz|clz|cplz", "dll"), $($_ -replace "cpz|clz|cplz", "xml")) Write-Host "Filenames:" @@ -36,6 +36,8 @@ Get-ChildItem -Path $destination | Where-Object {($_.Extension -eq ".clz") -or ( Get-ChildItem -Recurse -Path "$($Env:GITHUB_WORKSPACE)" -include $filenames | Copy-Item -Destination ($destination) -Force } } + +Get-ChildItem -Path $destination\*.cpz | Rename-Item -NewName { "$($_.BaseName)-$($Env:VERSION)$($_.Extension)" } Compress-Archive -Path $destination -DestinationPath "$($Env:GITHUB_WORKSPACE)\$($Env:SOLUTION_FILE)-$($Env:VERSION).zip" -Force Write-Host "Output Contents post Zip" Get-ChildItem -Path $destination \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1160d8ea..27078b41 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -78,7 +78,8 @@ jobs: # Create the release on the source repo - name: Create Release id: create_release - uses: actions/create-release@v1 + # using contributor's version to allow for pointing at the right commit + uses: fleskesvor/create-release@feature/support-target-commitish with: tag_name: ${{ env.VERSION }} release_name: ${{ env.VERSION }}