Skip to content

Commit 895f609

Browse files
committed
do not use dotnet publish
using dotnet publish causes call build even if --no-build is used. This would cause the test projet to fail. So, we will just copy the signed apk to publish area after build and not use dotnet publish at all.
1 parent f1d586b commit 895f609

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/CI Publish.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ jobs:
4747
- name: Run tests
4848
run: dotnet test -c Release --no-build -l:"console;verbosity=normal"
4949

50-
- name: Publish MAUI Android
51-
run: dotnet publish -f net8.0-android --no-build
52-
5350
- name: Save asset name
5451
id: save_asset_name
5552
shell: bash

PeriodTracker/Directory.Build.targets

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
<Project>
33

4-
<Target Name="CopyPublishedAssetsAndroid"
5-
AfterTargets="Publish"
4+
<Target Name="PublishAssetsAndroid"
5+
AfterTargets="Build"
66
DependsOnTargets="CreateEasyPublishDir"
7-
Condition="$(TargetFramework.Contains('-android')) and '$(Configuration)' == 'Release'">
7+
Condition="$(TargetFramework.Contains('-android')) and '$(Configuration)' == 'Release' and '$(IsBuildCiPublish)' == 'true'">
88
<PropertyGroup>
9-
<OriginalFile>$(ProjectDir)$(PublishDir)$(ApplicationId)-Signed.apk</OriginalFile>
9+
<OriginalFile>$(ProjectDir)$(OutDir)$(ApplicationId)-Signed.apk</OriginalFile>
1010
<CopiedFile>$(EasyPublishDir)$(ApplicationTitle).$(Version).apk</CopiedFile>
1111
</PropertyGroup>
1212

0 commit comments

Comments
 (0)