-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpsakeFile.ps1
34 lines (29 loc) · 1.05 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
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
}