Skip to content

Commit 4527a54

Browse files
committed
Fix: CI
1 parent a9451c7 commit 4527a54

2 files changed

Lines changed: 20 additions & 11 deletions

File tree

.github/workflows/canary.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,21 @@ jobs:
144144
Get-ChildItem Cert:\CurrentUser\My |
145145
Select Subject, Thumbprint
146146
147+
- name: Generate package metadata
148+
id: meta
149+
shell: pwsh
150+
run: |
151+
$dateYear = Get-Date -Format yyyy
152+
$dateMonth = (Get-Date).Month
153+
$dateDay = (Get-Date).Day
154+
$date = Get-Date -Format yyyyMMdd
155+
$shortSha = "${{ github.sha }}".Substring(0, 7)
156+
$name = "OpenNet.Canary_${date}_${{ matrix.platform }}_${shortSha}"
157+
$version = "$dateYear.$dateMonth.$dateDay.${shortSha}"
158+
"date=$date" >> $env:GITHUB_OUTPUT
159+
"package_name=$name" >> $env:GITHUB_OUTPUT
160+
"version=$version" >> $env:GITHUB_OUTPUT
161+
147162
- name: Build MSIX
148163
shell: pwsh
149164
working-directory: ${{ github.workspace }}
@@ -154,7 +169,7 @@ jobs:
154169
/p:GenerateAppxPackageOnBuild=true `
155170
/p:UapAppxPackageBuildMode=SideloadOnly `
156171
/p:AppxPackageDir=AppPackages\ `
157-
/p:AppxPackageVersion=1.0.${{ needs.build.outputs.date }}.${{ github.run_number }} `
172+
/p:AppxPackageVersion=${{ steps.meta.outputs.version }} `
158173
/p:AppxPackageSigningEnabled=true `
159174
/p:PackageCertificateThumbprint="${{ steps.import_cert.outputs.thumbprint }}" `
160175
/p:PackageCertificateKeyFile= `
@@ -174,16 +189,6 @@ jobs:
174189
175190
Remove-Item "$env:GITHUB_WORKSPACE\cert.pfx" -Force -ErrorAction SilentlyContinue
176191
177-
- name: Generate package metadata
178-
id: meta
179-
shell: pwsh
180-
run: |
181-
$date = Get-Date -Format yyyyMMdd
182-
$shortSha = "${{ github.sha }}".Substring(0, 7)
183-
$name = "OpenNet.Canary_${date}_${{ matrix.platform }}_${shortSha}"
184-
"date=$date" >> $env:GITHUB_OUTPUT
185-
"package_name=$name" >> $env:GITHUB_OUTPUT
186-
187192
- name: Copy SideloadReadme
188193
shell: pwsh
189194
run: Copy-Item SideloadReadme.md OpenNet\AppPackages\SideloadReadme.md -Force

OpenNet/OpenNet.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,10 @@
858858
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
859859
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">stdc11</LanguageStandard_C>
860860
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Release|x64'">stdc11</LanguageStandard_C>
861+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
862+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
863+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">NotUsing</PrecompiledHeader>
864+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">NotUsing</PrecompiledHeader>
861865
</ClCompile>
862866
<ClCompile Include="ViewModels\MainViewModel.cpp">
863867
<DependentUpon>ViewModels\MainViewModel.idl</DependentUpon>

0 commit comments

Comments
 (0)