-
Notifications
You must be signed in to change notification settings - Fork 3
106 lines (92 loc) · 2.72 KB
/
dev.yml
File metadata and controls
106 lines (92 loc) · 2.72 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: dev
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
on:
# push:
# branches: [ "dev" ]
# paths:
# - 'src/**'
# - 'cake/**'
# - '.github/**'
workflow_dispatch:
inputs:
publish:
type: boolean
required: false
default: false
description: "Set to 'true' to publish packages"
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: [self-hosted, Windows, X64, L2, AX] # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: "Build script"
run: dotnet build cake/Build.csproj
shell: pwsh
- name: "Run build script"
env:
GH_TOKEN : ${{ secrets.GH_TOKEN }}
GH_USER : ${{ secrets.GH_USER }}
run: |
dotnet run --project cake/Build.csproj --do-test --do-pack --test-level 2
"TEST_EXIT_CODE=$LASTEXITCODE" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
shell: pwsh
- name: "Publish packages"
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_USER: ${{ secrets.GH_USER }}
run: |
dotnet run --project cake/Build.csproj --do-publish-only --do-publish --do-publish-release
"PACK_EXIT_CODE=$LASTEXITCODE" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
shell: pwsh
docs:
needs: build
runs-on: [self-hosted, Windows, X64, L2, AX]
steps:
- name: Generate ctrl API metadata (ixd)
shell: pwsh
run: .\scripts\_invoke_ixd.ps1
- name: Docfx metadata
shell: pwsh
run: dotnet docfx metadata .\docfx\docfx.json
- name: Docfx build
shell: pwsh
run: dotnet docfx build .\docfx\docfx.json --output .\docs\
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: docs-site
path: docs
retention-days: 1
deploy:
needs: docs
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download docs artifact
uses: actions/download-artifact@v4
with:
name: docs-site
path: site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4