Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
- name: Restore, Build, and Pack
run: |
dotnet restore *.sln
dotnet build *.sln --configuration Release --no-restore
dotnet pack *.sln --configuration Release --no-build --output ./artifacts
dotnet build *.sln --configuration Release --no-restore -p:ContinuousIntegrationBuild=true
dotnet pack *.sln --configuration Release --no-build --output ./artifacts -p:ContinuousIntegrationBuild=true

- name: Publish to NuGet
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased][Unreleased]
## [Unreleased]

## [0.0.2-alpha] - 2025-07-12

## [0.0.1-alpha][0.0.1-alpha]
### Fixed

- Packaging

## [0.0.1-alpha] - 2025-07-12

### Added

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

[Unreleased]: https://github.com/datacute/SourceGeneratorContext/compare/0.0.1-alpha...develop
[0.0.1-alpha]: https://github.com/datacute/SourceGeneratorContext/releases/tag/0.0.1-alpha
[0.0.1-alpha]: https://github.com/datacute/SourceGeneratorContext/releases/0.0.1-alpha
33 changes: 16 additions & 17 deletions SourceGeneratorContext/SourceGeneratorContext.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<IsRoslynAnalyzer>true</IsRoslynAnalyzer>
<DevelopmentDependency>true</DevelopmentDependency>
<DebugType>portable</DebugType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

Expand All @@ -30,6 +31,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -52,32 +54,29 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!-- This ensures the generator DLL itself is placed in the analyzers folder -->
<!-- The SDK usually handles this automatically when Microsoft.CodeAnalysis.* are referenced -->
<!-- but explicitly adding it can sometimes help if packing behaves unexpectedly. -->
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />

<!-- Pack the attributes dll in the analyzers/dotnet/cs path -->
<None Include="$(OutputPath)\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<!-- Explicitly pack the main DLL as an analyzer -->
<None Include="$(TargetDir)$(TargetFileName)" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>

<!-- Pack the attributes dll in the lib\netstandard2.0 path -->
<None Include="$(OutputPath)\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
<None Include="$(OutputPath)\Datacute.SourceGeneratorContext.Attribute.xml" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
<ItemGroup>
<!-- Pack the attributes dll and related files in the lib/netstandard2.0 path -->
<None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
<None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.xml" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
<None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.pdb" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />

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

<ItemGroup>
<ProjectReference Include="..\SourceGeneratorContext.Attribute\SourceGeneratorContext.Attribute.csproj" />
<ProjectReference Include="..\SourceGeneratorContext.Attribute\SourceGeneratorContext.Attribute.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="all" IncludeAssets="none" />
</ItemGroup>

<Target Name="CopyDatacuteLightweightTracing" AfterTargets="Build">
<ItemGroup>
<DatacuteLightweightTracingFiles Include="$(PkgDatacute_LightweightTracing)\lib\netstandard2.0\*.dll" />
</ItemGroup>
<Copy SourceFiles="@(DatacuteLightweightTracingFiles)" DestinationFolder="$(OutputPath)" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>0.0.1</VersionPrefix>
<VersionPrefix>0.0.2</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
</PropertyGroup>
</Project>