-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpsakeFile.ps1
43 lines (36 loc) · 1.42 KB
/
psakeFile.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Properties {
# Set this to $true to create a module with a monolithic PSM1
$PSBPreference.Build.CompileModule = $false
$PSBPreference.Help.DefaultLocale = 'en-US'
$PSBPreference.Test.OutputFile = 'out/testResults.xml'
$PSBPreference.Build.CopyDirectories = @()
# Publish settings
if ($galleryApiKey) {
$PSBPreference.Publish.PSRepositoryApiKey = $galleryApiKey.GetNetworkCredential().password
}
}
Task Default -depends Test
Task Test -FromModule PowerShellBuild -minimumVersion '0.6.1'
Task InstallAct {
if (-not (Get-Command -name act -CommandType Application -ErrorAction SilentlyContinue)) {
if ($IsWindows) {
choco install act-cli
} elseif ($IsLinux) {
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
} elseIf ($IsMacOS) {
brew install nektos/tap/act
}
} else {
'act already installed'
}
}
Task TestGHAction -depends Build, InstallAct {
act -j test -P ubuntu-latest=nektos/act-environments-ubuntu:18.04
}
Task GenerateYAMLHelp -depends GenerateMarkdown {
If (-not (Get-Command New-YamlHelp -CommandType Function -ErrorAction SilentlyContinue)) {
Install-Module -Name platyPS -Repository PSGallery -Scope CurrentUser -Force
}
New-YamlHelp -Path './Docs/en-US' -OutputFolder './Docs/en-US' -Force
}
# Get-HelpPreview -Path .\Docs\en-US\PSXLDevTools-help.xml