-
Notifications
You must be signed in to change notification settings - Fork 41
108 lines (82 loc) · 3.15 KB
/
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
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
107
108
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Checkout Secret Repo
# uses: actions/checkout@master
# with:
# repository: NeVeSpl/SecretRepository
# token: ${{ secrets.SR_PAT }}
# path: ./binaries/revit/2025/
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore Packages
run: nuget restore RevitDBExplorer.sln
- name: Restore Packages for .net framework
run: msbuild /r /p:Configuration=R2021
- name: Build Project for R2021
working-directory: sources/RevitDBExplorer/
run: |
msbuild /p:Configuration=R2021
- name: Build Project for R2022
working-directory: sources/RevitDBExplorer/
run: |
msbuild /p:Configuration=R2022
- name: Build Project for R2023
working-directory: sources/RevitDBExplorer/
run: |
msbuild /p:Configuration=R2023
- name: Build Project for R2024
working-directory: sources/RevitDBExplorer/
run: |
msbuild /p:Configuration=R2024
- name: Remove obj folder
uses: JesseTG/[email protected]
with:
path: sources/RevitDBExplorer/obj
- name: Restore Packages for .net core
run: msbuild /r /p:Configuration=R2025
- name: Build Project for R2025
working-directory: sources/RevitDBExplorer/
run: |
msbuild /p:Configuration=R2025
- name: Create Code Signing Certificate
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.BASE64_ENCODED_PFX }}'
certutil -decode certificate\certificate.txt certificate\certificate.pfx
#- name: Sign RevitDBExplorer.dll
# run: |
# & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f certificate\certificate.pfx /p '${{ secrets.PFX_KEY }}' /t http://timestamp.comodoca.com/authenticode sources/bin/Release/RevitDBExplorer.dll
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: Build
path: "sources/bin/"
- name: Build SetupBuilder.exe
working-directory: setup/
run: msbuild /p:Configuration=Release /p:BuildProjectReferences=false
- name: Run SetupBuilder.exe
working-directory: setup/bin/Release/
run: |
./SetupBuilder.exe
#- name: Sign *.msi
# run: |
# & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f certificate\certificate.pfx /p '${{ secrets.PFX_KEY }}' /t http://timestamp.comodoca.com/authenticode setup/bin/Release/*.msi
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: Setup
path: setup/bin/Release/RevitDBExplorer.msi