-
Notifications
You must be signed in to change notification settings - Fork 4
76 lines (71 loc) · 2.47 KB
/
2_AutoBuildAndDocs.yml
File metadata and controls
76 lines (71 loc) · 2.47 KB
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
67
68
69
70
71
72
73
74
75
76
name: PR Post Process, Build & Generate Docs
on:
workflow_dispatch:
# pull_request:
# types: closed
branches:
- master
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Clean bin\debug
run: remove-item -path .\Src\bin\Debug\netcoreapp3.1\FlowChartCore.* -force
shell: pwsh
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Install dependencies
run: dotnet restore .\src\
- name: Build & Upload Artifact
run: dotnet build .\src\ --no-restore
- uses: actions/upload-artifact@v2
with:
name: Build
path: .\Src\bin\Debug\netcoreapp3.1\
report:
runs-on: windows-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v4.1.7
with:
name: Build
path: .\temp
- name: Copy EveryThing From Artifact To Debug
run: |
Copy-Item .\temp\* .\Src\bin\Debug\netcoreapp3.1\ -Force -PassThru
rmdir .\temp -recurse -force
shell: pwsh
- name: Copy & Generate Help Files
run: |
## Install & Load PlatyPS
Install-Module PlatyPS -force
Import-Module PlatyPS -Force -PassThru
## Create module Path if it does not exist
if ( -not (test-path -path .\src\module) ){
New-Item -ItemType Directory -Path .\src\module -Force
} Else {
Remove-Item -Path .\src\module\* -Recurse -Exclude '*.psd1'
}
## Copy DLL Directories
Copy-Item -Path .\src\bin\debug\netcoreapp3.1\*.dll -Destination .\src\module\ -Force -PassThru
## Copy Docs
Get-ChildItem -Path .\docs -Directory | Copy-Item -Container -Destination .\src\module\ -Recurse -Force -PassThru
## Generate External help files
$DocFolders = @('en-US','fr-FR')
Foreach ( $HFolder in $DocFolders ) {
$MDFiles = Get-ChildItem -Path ".\src\module\$HFolder" -filter *.md
Write-OutPut $MDFiles.Count
New-ExternalHelp -Path $MDFiles -OutputPath ".\src\module\$Hfolder" -Force -Verbose
}
- name: Commit & Push to Main
run: |
git status
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add --all
git commit -m 'Auto Commit'
git push