Skip to content

Commit

Permalink
Nuspec Workflow Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jworkmanjc committed Sep 28, 2023
1 parent 8d34119 commit 68ce0f9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/powershell-module-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: PowerShell Module CI
on: [push]
jobs:
Publish-PowerShell-Artifact:
runs-on: ubuntu-latest
env:
source: CodeArtifact
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
PowerShell/Deploy
PowerShell/JumpCloud\ Module
- shell: pwsh
run: |
. "./PowerShell/Deploy/BuildNuspecFromPsd1.ps1" -RequiredModulesRepo PSGallery
6 changes: 3 additions & 3 deletions PowerShell/Deploy/BuildNuspecFromPsd1.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ function New-NuspecFile {
# Append buildNumber
if ($env:Source -eq "CodeArtifact") {
$date = (Get-Date).ToString("yyyyMMddHHmm")
# $BuildString = "build$($env:CIRCLE_BUILD_NUM)datetime$($date)"
$build = $($env:CIRCLE_BUILD_NUM)
# $BuildString = "build$($env:GITHUB_RUN_NUMBER)datetime$($date)"
$build = $($env:GITHUB_RUN_NUMBER)
$Version = $Version + ".$($build)" + "-$date"
}

Expand Down Expand Up @@ -178,7 +178,7 @@ $Psd1 = Import-PowerShellDataFile -Path:($FilePath_psd1)
$params = @{
OutputPath = $FolderPath_Module
Id = $(Get-Item ($FilePath_psd1)).BaseName
buildNumber = $env:CIRCLE_BUILD_NUM
buildNumber = $env:GITHUB_RUN_NUMBER
Version = $Psd1.ModuleVersion
Authors = $Psd1.Author
Owners = $Psd1.CompanyName
Expand Down
4 changes: 2 additions & 2 deletions PowerShell/Deploy/Setup-Dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ If (!(Get-PackageProvider -Name:('NuGet') -ListAvailable -ErrorAction:('Silently
$PSDependencies = @{
'PowerShellGet' = @{Repository = 'PSGallery'; RequiredVersion = '3.0.12-beta' }
'PackageManagement' = @{Repository = 'PSGallery'; RequiredVersion = '1.4.8.1' }
'PSScriptAnalyzer' = @{Repository = 'PSGallery'; RequiredVersion = '1.19.1' }
# 'PSScriptAnalyzer' = @{Repository = 'PSGallery'; RequiredVersion = '1.19.1' }
'PlatyPS' = @{Repository = 'PSGallery'; RequiredVersion = '0.14.2' }
'Pester' = @{Repository = 'PSGallery'; RequiredVersion = '5.3.3' }
# 'Pester' = @{Repository = 'PSGallery'; RequiredVersion = '5.3.3' }
'AWS.Tools.Common' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' }
'AWS.Tools.CodeArtifact' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' }
}
Expand Down

0 comments on commit 68ce0f9

Please sign in to comment.