Skip to content

Commit f11c0ed

Browse files
authored
Merge pull request #4 from datacute/release/0.0.2-alpha
Release/0.0.2 alpha - Fix packaging
2 parents af59be1 + d2a1c46 commit f11c0ed

File tree

4 files changed

+27
-23
lines changed

4 files changed

+27
-23
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
- name: Restore, Build, and Pack
2222
run: |
2323
dotnet restore *.sln
24-
dotnet build *.sln --configuration Release --no-restore
25-
dotnet pack *.sln --configuration Release --no-build --output ./artifacts
24+
dotnet build *.sln --configuration Release --no-restore -p:ContinuousIntegrationBuild=true
25+
dotnet pack *.sln --configuration Release --no-build --output ./artifacts -p:ContinuousIntegrationBuild=true
2626
2727
- name: Publish to NuGet
2828
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased][Unreleased]
8+
## [Unreleased]
99

10+
## [0.0.2-alpha] - 2025-07-12
1011

11-
## [0.0.1-alpha][0.0.1-alpha]
12+
### Fixed
13+
14+
- Packaging
15+
16+
## [0.0.1-alpha] - 2025-07-12
1217

1318
### Added
1419

@@ -54,4 +59,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5459
- Diagnostic log of the source generation process and timing included.
5560

5661
[Unreleased]: https://github.com/datacute/SourceGeneratorContext/compare/0.0.1-alpha...develop
57-
[0.0.1-alpha]: https://github.com/datacute/SourceGeneratorContext/releases/tag/0.0.1-alpha
62+
[0.0.1-alpha]: https://github.com/datacute/SourceGeneratorContext/releases/0.0.1-alpha

SourceGeneratorContext/SourceGeneratorContext.csproj

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
<IsRoslynAnalyzer>true</IsRoslynAnalyzer>
2121
<DevelopmentDependency>true</DevelopmentDependency>
22+
<DebugType>portable</DebugType>
2223
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2324
</PropertyGroup>
2425

@@ -30,6 +31,7 @@
3031
<PackageReadmeFile>README.md</PackageReadmeFile>
3132
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
3233
<PackageLicenseExpression>MIT</PackageLicenseExpression>
34+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
3335
</PropertyGroup>
3436

3537
<PropertyGroup>
@@ -52,32 +54,29 @@
5254
<ItemGroup>
5355
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
5456
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" PrivateAssets="all" />
57+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
58+
<PrivateAssets>all</PrivateAssets>
59+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
60+
</PackageReference>
5561
</ItemGroup>
5662

5763
<ItemGroup>
58-
<!-- This ensures the generator DLL itself is placed in the analyzers folder -->
59-
<!-- The SDK usually handles this automatically when Microsoft.CodeAnalysis.* are referenced -->
60-
<!-- but explicitly adding it can sometimes help if packing behaves unexpectedly. -->
61-
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
62-
6364
<!-- Pack the attributes dll in the analyzers/dotnet/cs path -->
64-
<None Include="$(OutputPath)\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
65+
<None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
66+
<!-- Explicitly pack the main DLL as an analyzer -->
67+
<None Include="$(TargetDir)$(TargetFileName)" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
68+
</ItemGroup>
6569

66-
<!-- Pack the attributes dll in the lib\netstandard2.0 path -->
67-
<None Include="$(OutputPath)\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
68-
<None Include="$(OutputPath)\Datacute.SourceGeneratorContext.Attribute.xml" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
70+
<ItemGroup>
71+
<!-- Pack the attributes dll and related files in the lib/netstandard2.0 path -->
72+
<None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
73+
<None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.xml" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
74+
<None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.pdb" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
6975

7076
<None Include="../README.md" Pack="true" PackagePath="" />
7177
</ItemGroup>
7278

7379
<ItemGroup>
74-
<ProjectReference Include="..\SourceGeneratorContext.Attribute\SourceGeneratorContext.Attribute.csproj" />
80+
<ProjectReference Include="..\SourceGeneratorContext.Attribute\SourceGeneratorContext.Attribute.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="all" IncludeAssets="none" />
7581
</ItemGroup>
76-
77-
<Target Name="CopyDatacuteLightweightTracing" AfterTargets="Build">
78-
<ItemGroup>
79-
<DatacuteLightweightTracingFiles Include="$(PkgDatacute_LightweightTracing)\lib\netstandard2.0\*.dll" />
80-
</ItemGroup>
81-
<Copy SourceFiles="@(DatacuteLightweightTracingFiles)" DestinationFolder="$(OutputPath)" />
82-
</Target>
8382
</Project>

version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<VersionPrefix>0.0.1</VersionPrefix>
3+
<VersionPrefix>0.0.2</VersionPrefix>
44
<VersionSuffix>alpha</VersionSuffix>
55
</PropertyGroup>
66
</Project>

0 commit comments

Comments
 (0)