From c14ce5ff61361398fe85345ad203aee400ae12eb Mon Sep 17 00:00:00 2001 From: deadlydog Date: Sun, 22 Oct 2023 15:06:04 -0600 Subject: [PATCH] refactor: Rename variables to be more explicit --- .../build-and-test-powershell-module.yml | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-and-test-powershell-module.yml b/.github/workflows/build-and-test-powershell-module.yml index 257574f..074d9ee 100644 --- a/.github/workflows/build-and-test-powershell-module.yml +++ b/.github/workflows/build-and-test-powershell-module.yml @@ -16,13 +16,13 @@ on: default: '' outputs: prereleaseModuleArtifactName: - description: 'The name of the prerelease artifact.' - value: ${{ jobs.build-and-test.outputs.prereleaseArtifactName }} + description: 'The name of the prerelease module artifact created by the build.' + value: ${{ jobs.build-and-test.outputs.prereleaseModuleArtifactName }} stableModuleArtifactName: - description: 'The name of the stable artifact.' - value: ${{ jobs.build-and-test.outputs.stableArtifactName }} + description: 'The name of the stable module artifact created by the build.' + value: ${{ jobs.build-and-test.outputs.stableModuleArtifactName }} deployFilesArtifactName: - description: 'The name of the deploy files artifact.' + description: 'The name of the deploy files artifact created by the build.' value: ${{ jobs.build-and-test.outputs.deployFilesArtifactName }} env: @@ -30,20 +30,20 @@ env: powerShellModuleDirectoryPath: './src/tiPS' powerShellModuleManifestFileName: 'tiPS.psd1' deployFilesDirectoryPath: './deploy' - prereleaseArtifactDirectoryPath: './artifacts/Prerelease' - stableArtifactDirectoryPath: './artifacts/Stable' - deployFilesArtifactDirectoryPath: './artifacts/deploy' - prereleaseArtifactName: 'PrereleaseModuleArtifact' - stableArtifactName: 'StableModuleArtifact' + prereleaseModuleArtifactName: 'PrereleaseModuleArtifact' + prereleaseModuleArtifactDirectoryPath: './artifacts/Prerelease' + stableModuleArtifactName: 'StableModuleArtifact' + stableModuleArtifactDirectoryPath: './artifacts/Stable' deployFilesArtifactName: 'DeployFilesArtifact' + deployFilesArtifactDirectoryPath: './artifacts/deploy' ciVersionTagPrefix: 'ci-version-' jobs: build-and-test: runs-on: windows-latest # Use Windows agent to ensure dotnet.exe is available to build C# assemblies. outputs: - prereleaseArtifactName: ${{ env.prereleaseArtifactName }} - stableArtifactName: ${{ env.stableArtifactName }} + prereleaseModuleArtifactName: ${{ env.prereleaseModuleArtifactName }} + stableModuleArtifactName: ${{ env.stableModuleArtifactName }} deployFilesArtifactName: ${{ env.deployFilesArtifactName }} steps: - name: Checkout the repo source code @@ -178,8 +178,8 @@ jobs: [string] $moduleName = $Env:powerShellModuleName [string] $moduleDirectoryPath = $Env:powerShellModuleDirectoryPath [string] $moduleManifestFileName = $Env:powerShellModuleManifestFileName - [string] $prereleaseArtifactModuleDirectoryPath = Join-Path -Path $Env:prereleaseArtifactDirectoryPath -ChildPath $moduleName - [string] $stableArtifactModuleDirectoryPath = Join-Path -Path $Env:stableArtifactDirectoryPath -ChildPath $moduleName + [string] $prereleaseArtifactModuleDirectoryPath = Join-Path -Path $Env:prereleaseModuleArtifactDirectoryPath -ChildPath $moduleName + [string] $stableArtifactModuleDirectoryPath = Join-Path -Path $Env:stableModuleArtifactDirectoryPath -ChildPath $moduleName Write-Output "Reading in dynamic environment variables." [string] $newVersionNumber = $Env:NewVersionNumber @@ -260,14 +260,14 @@ jobs: - name: Upload prerelease module artifact uses: actions/upload-artifact@v3 with: - name: ${{ env.prereleaseArtifactName }} - path: ${{ env.prereleaseArtifactDirectoryPath }} + name: ${{ env.prereleaseModuleArtifactName }} + path: ${{ env.prereleaseModuleArtifactDirectoryPath }} - name: Upload stable module artifact uses: actions/upload-artifact@v3 with: - name: ${{ env.stableArtifactName }} - path: ${{ env.stableArtifactDirectoryPath }} + name: ${{ env.stableModuleArtifactName }} + path: ${{ env.stableModuleArtifactDirectoryPath }} - name: Upload deploy files artifact uses: actions/upload-artifact@v3