-
Notifications
You must be signed in to change notification settings - Fork 153
48 lines (47 loc) · 1.32 KB
/
powershell-module-ci.yml
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
44
45
46
47
48
name: PowerShell Module CI
env:
# Set the release type of the release, valid values are 'major', 'minor' or 'patch'
RELEASE_TYPE: "patch"
# override version boolean. If specified, valid vlaues are 'true' or 'false'
OVERRIDE_VERSION: "false"
on: [push]
jobs:
validate-env-variables:
runs-on: ubuntu-latest
steps:
- shell: pwsh
run: |
# validate release type variables
$env:OVERRIDE_VERSION | Should -BeIn @('true', 'false')
$env:RELEASE_TYPE | Should -BeIn @('major','minor','patch')
clone:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
Publish-PowerShell-Artifact:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
Source: "CodeArtifact"
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
PowerShell
- shell: pwsh
run: |
. "./PowerShell/Deploy/BuildNuspecFromPsd1.ps1" -RequiredModulesRepo PSGallery
Validate-Module:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
PowerShell
- shell: pwsh
run: |
. "./PowerShell/JumpCloud Module/Tests/InvokePester.ps1" -ModuleValidation