Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f716c8

Browse files
authored
chore: add GitHub actions and remove Package wapproj (#13)
Adds fmt, test and build jobs using dotnet.The fmt job currently doesn't match what Rider does, but I think thatwill be difficult to pull off without using a different formatting toolwhich I don't want to investigate for now.Removes the `Package` project in favor of making the `App` projectinclude the necessary stuff for packaging itself. We weren't getting anybenefit from it being in a separate package yet and it was not buildingcorrectly in dotnet (only in VS) when they were separated.Closes#7
1 parent7b0e421 commit7f716c8

File tree

36 files changed

+1509
-92
lines changed

36 files changed

+1509
-92
lines changed

‎.github/workflows/ci.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name:ci
2+
3+
on:
4+
push:
5+
branches:
6+
-main
7+
pull_request:
8+
branches:
9+
-main
10+
11+
jobs:
12+
fmt:
13+
runs-on:windows-latest
14+
steps:
15+
-uses:actions/checkout@v4
16+
-name:Setup dotnet
17+
uses:actions/setup-dotnet@v4
18+
with:
19+
dotnet-version:8.0.x
20+
cache:true
21+
cache-dependency-path:'**/packages.lock.json'
22+
-name:dotnet restore
23+
run:dotnet restore --locked-mode
24+
-name:dotnet format
25+
run:dotnet format --verify-no-changes --no-restore
26+
27+
test:
28+
runs-on:windows-latest
29+
steps:
30+
-uses:actions/checkout@v4
31+
-name:Setup dotnet
32+
uses:actions/setup-dotnet@v4
33+
with:
34+
dotnet-version:8.0.x
35+
cache:true
36+
cache-dependency-path:'**/packages.lock.json'
37+
-name:dotnet restore
38+
run:dotnet restore --locked-mode
39+
-name:dotnet test
40+
run:dotnet test --no-restore
41+
42+
build:
43+
runs-on:windows-latest
44+
steps:
45+
-uses:actions/checkout@v4
46+
-name:Setup dotnet
47+
uses:actions/setup-dotnet@v4
48+
with:
49+
dotnet-version:8.0.x
50+
cache:true
51+
cache-dependency-path:'**/packages.lock.json'
52+
-name:dotnet restore
53+
run:dotnet restore --locked-mode
54+
-name:dotnet publish
55+
run:dotnet publish --no-restore --configuration Release --output .\publish
56+
-name:Upload artifact
57+
uses:actions/upload-artifact@v4
58+
with:
59+
name:publish
60+
path:.\publish\

‎.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ publish/
186186
*.azurePubxml
187187
# Note: Comment the next line if you want to checkin your web deploy settings,
188188
# but database connection strings (with potential passwords) will be unencrypted
189-
*.pubxml
189+
#*.pubxml
190190
*.publishproj
191191

192192
# Microsoft Azure Web App publish settings. Comment the next line if you want to
@@ -401,3 +401,5 @@ FodyWeavers.xsd
401401
.idea/**/workspace.xml
402402
.idea/**/usage.statistics.xml
403403
.idea/**/shelf
404+
405+
publish

‎App/App.csproj

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,38 @@
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;ARM64</Platforms>
99
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10+
<PublishProfile>Properties\PublishProfiles\win-$(Platform).pubxml</PublishProfile>
1011
<UseWinUI>true</UseWinUI>
1112
<Nullable>enable</Nullable>
13+
<EnableMsixTooling>true</EnableMsixTooling>
14+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
1215
</PropertyGroup>
1316

1417
<ItemGroup>
15-
<ManifestInclude="$(ApplicationManifest)"/>
18+
<AppxManifestInclude="Package.appxmanifest">
19+
<SubType>Designer</SubType>
20+
</AppxManifest>
1621
</ItemGroup>
1722

1823
<ItemGroup>
19-
<PackageReferenceInclude="CommunityToolkit.Mvvm"Version="8.4.0"/>
24+
<ManifestInclude="$(ApplicationManifest)" />
25+
</ItemGroup>
26+
27+
<ItemGroup>
28+
<ContentInclude="Images\SplashScreen.scale-200.png" />
29+
<ContentInclude="Images\Square150x150Logo.scale-200.png" />
30+
<ContentInclude="Images\Square44x44Logo.scale-200.png" />
31+
</ItemGroup>
32+
33+
<ItemGroup>
34+
<PackageReferenceInclude="CommunityToolkit.Mvvm"Version="8.4.0" />
2035
<PackageReferenceInclude="DependencyPropertyGenerator"Version="1.5.0">
2136
<PrivateAssets>all</PrivateAssets>
2237
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2338
</PackageReference>
24-
<PackageReferenceInclude="H.NotifyIcon.WinUI"Version="2.2.0"/>
25-
<PackageReferenceInclude="Microsoft.Windows.SDK.BuildTools"Version="10.0.26100.1742"/>
26-
<PackageReferenceInclude="Microsoft.WindowsAppSDK"Version="1.6.250108002"/>
39+
<PackageReferenceInclude="H.NotifyIcon.WinUI"Version="2.2.0"/>
40+
<PackageReferenceInclude="Microsoft.Windows.SDK.BuildTools"Version="10.0.26100.1742"/>
41+
<PackageReferenceInclude="Microsoft.WindowsAppSDK"Version="1.6.250108002"/>
2742
</ItemGroup>
2843

2944
<ItemGroup>
@@ -38,10 +53,33 @@
3853
</Page>
3954
</ItemGroup>
4055

56+
<!--
57+
Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
58+
Tools extension to be activated for this project even if the Windows App SDK Nuget
59+
package has not yet been restored.
60+
-->
61+
<ItemGroupCondition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
62+
<ProjectCapabilityInclude="Msix" />
63+
</ItemGroup>
64+
65+
<!--
66+
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
67+
Explorer "Package and Publish" context menu entry to be enabled for this project even if
68+
the Windows App SDK Nuget package has not yet been restored.
69+
-->
70+
<PropertyGroupCondition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
71+
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
72+
</PropertyGroup>
73+
4174
<!-- Publish Properties-->
4275
<PropertyGroup>
76+
<!--
77+
This does not work in CI at the moment, so we need to set it to false
78+
Error: C:\Program Files\dotnet\sdk\9.0.102\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(400,5): error NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. [D:\a\coder-desktop-windows\coder-desktop-windows\App\App.csproj]
4379
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
4480
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
81+
-->
82+
<PublishReadyToRun>False</PublishReadyToRun>
4583
<PublishTrimmedCondition="'$(Configuration)' == 'Debug'">False</PublishTrimmed>
4684
<PublishTrimmedCondition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
4785
</PropertyGroup>

‎App/Package.appxmanifest

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<Package
4+
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
5+
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
6+
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
7+
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
8+
IgnorableNamespaces="uap rescap">
9+
10+
<Identity
11+
Name="925b49fc-4648-4967-b4e6-b5473061ee62"
12+
Publisher="CN=Coder Technologies Inc."
13+
Version="1.0.0.0"/>
14+
15+
<mp:PhoneIdentityPhoneProductId="925b49fc-4648-4967-b4e6-b5473061ee62"
16+
PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
17+
18+
<Properties>
19+
<DisplayName>Coder Desktop (Package)</DisplayName>
20+
<PublisherDisplayName>Coder Technologies Inc.</PublisherDisplayName>
21+
<Logo>Images\StoreLogo.png</Logo>
22+
</Properties>
23+
24+
<Dependencies>
25+
<TargetDeviceFamilyName="Windows.Universal"MinVersion="10.0.17763.0"MaxVersionTested="10.0.19041.0"/>
26+
<TargetDeviceFamilyName="Windows.Desktop"MinVersion="10.0.17763.0"MaxVersionTested="10.0.19041.0"/>
27+
</Dependencies>
28+
29+
<Resources>
30+
<ResourceLanguage="x-generate"/>
31+
</Resources>
32+
33+
<Applications>
34+
<ApplicationId="App"
35+
Executable="$targetnametoken$.exe"
36+
EntryPoint="$targetentrypoint$">
37+
<uap:VisualElements
38+
DisplayName="Coder Desktop"
39+
Description="Coder"
40+
BackgroundColor="transparent"
41+
Square150x150Logo="Images\Square150x150Logo.png"
42+
Square44x44Logo="Images\Square44x44Logo.png">
43+
<uap:DefaultTileWide310x150Logo="Images\Wide310x150Logo.png"/>
44+
<uap:SplashScreenImage="Images\SplashScreen.png"/>
45+
</uap:VisualElements>
46+
</Application>
47+
</Applications>
48+
49+
<Capabilities>
50+
<rescap:CapabilityName="runFullTrust"/>
51+
</Capabilities>
52+
</Package>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<ProjectToolsVersion="4.0"xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>ARM64</Platform>
9+
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
10+
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>False</PublishSingleFile>
13+
</PropertyGroup>
14+
</Project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<ProjectToolsVersion="4.0"xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>x64</Platform>
9+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
10+
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>False</PublishSingleFile>
13+
</PropertyGroup>
14+
</Project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<ProjectToolsVersion="4.0"xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>x86</Platform>
9+
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
10+
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>False</PublishSingleFile>
13+
</PropertyGroup>
14+
</Project>

‎App/Properties/launchSettings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"profiles": {
3+
"App (Package)": {
4+
"commandName":"MsixPackage"
5+
},
6+
"App (Unpackaged)": {
7+
"commandName":"Project"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp