-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (63 loc) · 2.14 KB
/
init.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: '🎱 Prepare workflows configuration'
on:
workflow_call:
inputs:
buildAutoFakeItEasy:
description: 'Build AutoFakeItEasy'
required: false
type: boolean
default: true
buildAutoMoq:
description: 'Build AutoMoq'
required: false
type: boolean
default: true
buildAutoNSubstitute:
description: 'Build AutoNSubstitute'
required: false
type: boolean
default: true
outputs:
modules:
description: Modules to build and pack
value: ${{ jobs.run.outputs.modules }}
version:
description: Version used for building, packing and tagging
value: ${{ jobs.run.outputs.version }}
namespace:
description: Global namespace
value: Objectivity.AutoFixture.XUnit2
configuration:
description: Global build configuration
value: Release
defaults:
run:
shell: pwsh
jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
outputs:
modules: ${{ steps.determine-modules.outputs.modules }}
version: ${{ steps.determine-version.outputs.version }}
steps:
- name: 📥 checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🎰 determine modules
id: determine-modules
run: |
$allModules = @{
AutoMoq = if ('${{inputs.buildAutoMoq}}') { $${{inputs.buildAutoMoq}} } else { $true };
AutoNSubstitute = if ('${{inputs.buildAutoNSubstitute}}') { $${{inputs.buildAutoNSubstitute}} } else { $true };
AutoFakeItEasy = if ('${{inputs.buildAutoFakeItEasy}}') { $${{inputs.buildAutoFakeItEasy}} } else { $true }
}
$selectedModules = @(Foreach ($module in ($allModules.GetEnumerator() | Where-Object { $_.Value })) {$module.Name})
if ($selectedModules.count -gt 0) { $selectedModules = @("Core") + $selectedModules }
"modules=$($selectedModules | ConvertTo-JSON -AsArray -Compress)" >> $env:GITHUB_OUTPUT
- name: 🎱 determine next version
id: determine-version
uses: ./.github/actions/determine-next-version