-
Notifications
You must be signed in to change notification settings - Fork 22
128 lines (100 loc) · 5.51 KB
/
dev_actions.yml
File metadata and controls
128 lines (100 loc) · 5.51 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Compile and run tests
on:
push:
branches: [ develop, tests/*, features/*, docs/*, bugs/* ]
tags:
- 'v*'
jobs:
build:
env:
FULL_VERSION: "1.0.0.0"
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET Core 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Setup MSBuild Path
uses: microsoft/setup-msbuild@v1.1
- name: Uninstall default WiX Toolset
run: |
choco uninstall wixtoolset
- name: Install specific version of WiX Toolset
run: |
choco install wixtoolset --version=3.11.2
- name: Get certificate
run: |
$url = "${{ secrets.EVERSE_CERTIFICATE_S3_URL }}"
$outputFilePath = "$GITHUB_WORKSPACE/credentials.pfx"
$apiKey = "${{ secrets.EVERSE_AWS_S3_CERTIFICATE_KEY_ID }}"
$headers = @{
"x-api-key" = $apiKey
}
Invoke-RestMethod -Uri $url -Headers $headers -OutFile $outputFilePath
- name: define certfificate key
run: |
echo "CERTIFICATE_KEY=${{ secrets.EVERSE_CERTIFICATE_KEY }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- name: define certfificate location
run: |
echo "CERTIFICATE_LOCATION=$GITHUB_WORKSPACE/credentials.pfx" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.6
- name: Restore NuGet Packages
run: nuget restore Revit_glTF_Exporter.sln
- name: Setting new version to the config file
run: |
(Get-Content Common_glTF_Exporter/Utils/SettingsConfig.cs) -replace '0.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Common_glTF_Exporter/Utils/SettingsConfig.cs
- name: Configuring Key
run: |
$apiUrlKey = "${{ secrets.EVERSE_GLTF_EXPORTER_APIKEY }}"
(Get-Content Common_glTF_Exporter/Utils/SettingsConfig.cs) -replace 'PlaceHolderApiKey', apiUrlKey | Out-File -encoding ASCII Common_glTF_Exporter/Utils/SettingsConfig.cs
shell: pwsh
- name: Setting new version to the AssemblyInfo 2019
run: |
(Get-Content Revit_glTF_Exporter_2019/Properties/AssemblyInfo.cs) -replace '1.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Revit_glTF_Exporter_2019/Properties/AssemblyInfo.cs
- name: Setting new version to the AssemblyInfo 2020
run: |
(Get-Content Revit_glTF_Exporter_2020/Properties/AssemblyInfo.cs) -replace '1.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Revit_glTF_Exporter_2020/Properties/AssemblyInfo.cs
- name: Setting new version to the AssemblyInfo 2021
run: |
(Get-Content Revit_glTF_Exporter_2021/Properties/AssemblyInfo.cs) -replace '1.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Revit_glTF_Exporter_2021/Properties/AssemblyInfo.cs
- name: Setting new version to the AssemblyInfo 2022
run: |
(Get-Content Revit_glTF_Exporter_2022/Properties/AssemblyInfo.cs) -replace '1.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Revit_glTF_Exporter_2022/Properties/AssemblyInfo.cs
- name: Setting new version to the AssemblyInfo 2023
run: |
(Get-Content Revit_glTF_Exporter_2023/Properties/AssemblyInfo.cs) -replace '1.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Revit_glTF_Exporter_2023/Properties/AssemblyInfo.cs
- name: Setting new version to the AssemblyInfo 2024
run: |
(Get-Content Revit_glTF_Exporter_2024/Properties/AssemblyInfo.cs) -replace '1.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Revit_glTF_Exporter_2024/Properties/AssemblyInfo.cs
- name: Setting new version to the AssemblyInfo 2025
run: |
(Get-Content Revit_glTF_Exporter_2025/Revit_glTF_Exporter_2025.csproj) -replace '1.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Revit_glTF_Exporter_2025/Revit_glTF_Exporter_2025.csproj
- name: Setting new version to the AssemblyInfo 2026
run: |
(Get-Content Revit_glTF_Exporter_2026/Revit_glTF_Exporter_2026.csproj) -replace '1.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Revit_glTF_Exporter_2026/Revit_glTF_Exporter_2026.csproj
- name: Setting versions in PackageContents
run: |
(Get-Content Common_glTF_Exporter/PackageContents.xml) -replace '1.0.0', $env:FULL_VERSION | Out-File -encoding ASCII Common_glTF_Exporter/PackageContents.xml
- name: Configuring API URL
run: |
$apiUrl = "${{ secrets.EVERSE_GLTF_EXPORTER_APIURL }}"
(Get-Content Common_glTF_Exporter/Utils/Analytics.cs) -replace 'https://expoterAPI', $apiUrl | Out-File -encoding ASCII Common_glTF_Exporter/Utils/Analytics.cs
shell: pwsh
- name: Configuring AutoUpdate URL
run: |
$apiAutoUpdate = "${{ secrets.EVERSE_AUTOUPDATE_ADDINS_URL }}"
(Get-Content Common_glTF_Exporter/Version/LatestVersion.cs) -replace 'https://APIAutoUpdate', $apiAutoUpdate | Out-File -encoding ASCII Common_glTF_Exporter/Version/LatestVersion.cs
shell: pwsh
- name: Build and Publish App
run: msbuild Revit_glTF_Exporter.sln /t:Clean,Build /p:platform="Any CPU" /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile