Skip to content

Commit

Permalink
refactor: Rename variables to be more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlydog committed Oct 22, 2023
1 parent 03e2933 commit c14ce5f
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build-and-test-powershell-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@ 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:
powerShellModuleName: 'tiPS' # Must match the name in the deployment workflow.
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c14ce5f

Please sign in to comment.