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
28 changes: 18 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,36 @@ jobs:
with:
dotnet-version: '8.0.x'

- name: Get tag for current commit
id: get_tag
# Check for tags when triggered by main branch push (with tag) or direct tag push
# Can't use github.ref_name because it's "main" when pushing branch+tag together
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
uses: olegtarasov/get-tag@v2.1.4

- name: Set Version Profile
run: |
if [[ "${{ steps.get_tag.outputs.tag }}" != "" ]]; then
echo "VERSION_PROFILE=release" >> $GITHUB_ENV
else
echo "VERSION_PROFILE=ci" >> $GITHUB_ENV
fi

- name: Restore dependencies
run: dotnet restore $SOLUTION

- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore -p:GeneratePackageOnBuild=false -p:VersionProfile=${{ env.VERSION_PROFILE }}

- name: Run tests
run: dotnet test --configuration $BUILD_CONFIG --no-restore --no-build --verbosity normal
run: dotnet test --configuration $BUILD_CONFIG --no-restore --no-build --verbosity normal -p:VersionProfile=${{ env.VERSION_PROFILE }}

- name: Pack NuGet packages
run: |
dotnet pack $SOLUTION --configuration $BUILD_CONFIG --no-build --output ./artifacts
dotnet pack $SOLUTION --configuration $BUILD_CONFIG --no-build --output ./artifacts -p:VersionProfile=${{ env.VERSION_PROFILE }}
echo "=== Packages created ==="
ls -la ./artifacts/

- name: Get tag for current commit
id: get_tag
# Check for tags when triggered by main branch push (with tag) or direct tag push
# Can't use github.ref_name because it's "main" when pushing branch+tag together
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
uses: olegtarasov/get-tag@v2.1.4

- name: Extract release notes from CHANGELOG.md
if: steps.get_tag.outputs.tag != ''
id: extract_notes
Expand Down
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 -p:GeneratePackageOnBuild=false -p:VersionProfile=release
dotnet pack *.sln --configuration Release --no-build --output ./artifacts -p:ContinuousIntegrationBuild=true -p:VersionProfile=release

- 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
53 changes: 33 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,24 @@

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/),
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [[1.1.0]] - 2025-06-29
## [1.1.1] - 2025-08-03

### Added
- Included a count of the matching embedded resources in the generated class doc-comments

### Changed
- Converted to use Datacute.IncrementalGeneratorExtensions and Datacute.AdditionalTextConstantGenerator

### Fixed
- Fixed nullable reference type support for older .NET versions that don't support nullable annotations
- Removed file-scoped namespace from attribute for better compatibility with older C# versions

## [1.1.0] - 2025-06-29

### Added
- Support for nested classes and generics
Expand All @@ -21,30 +33,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Resolves issue #4 (performance improvements)
- Resolves issue #3 (nested classes and generics support)

## [[1.0.0]] - 2024-10-28
## [1.0.0] - 2024-10-28

### Added
- First stable release

## [[0.0.1-alpha.6b]] - 2024-09-24
## [0.0.1-alpha.6b] - 2024-09-24

### Fixed
- Corrected the published package (but the new version broke the doc links)

## [[0.0.1-alpha.6]] - 2024-09-24
## [0.0.1-alpha.6] - 2024-09-24

### Added
- More documentation

### Changed
- Removed windows specific paths from tests

## [[0.0.1-alpha.5]] - 2024-09-22
## [0.0.1-alpha.5] - 2024-09-22

### Fixed
- Included doc-comments of the EmbeddedResourceProperties attribute in the package

## [[0.0.1-alpha.4]] - 2024-09-15
## [0.0.1-alpha.4] - 2024-09-15

### Added
- Read method in each class
Expand All @@ -53,31 +65,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Moved the attribute to its own dll

## [[0.0.1-alpha.3]] - 2024-09-14
## [0.0.1-alpha.3] - 2024-09-14

### Added
- Included `EmbeddedResourcePropertyExample` project in github repository

### Fixed
- Removing doc duplication

## [[0.0.1-alpha.2]] - 2024-09-13
## [0.0.1-alpha.2] - 2024-09-13

### Added
- `[Conditional]` attribute to restrict inclusion of the usage of the `EmbeddedResourcePropertiesAttribute` in the output

## [[0.0.1-alpha]] - 2024-09-09
## [0.0.1-alpha] - 2024-09-09

### Added
- Support for overriding `ReadEmbeddedResourceValue` partial method

[Unreleased]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/1.1.0...HEAD
[1.1.0]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/0.0.1-alpha.6b...1.0.0
[0.0.1-alpha.6b]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/0.0.1-alpha.6...0.0.1-alpha.6b
[0.0.1-alpha.6]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/0.0.1-alpha.5...0.0.1-alpha.6
[0.0.1-alpha.5]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/0.0.1-alpha.4...0.0.1-alpha.5
[0.0.1-alpha.4]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/0.0.1-alpha.3...0.0.1-alpha.4
[0.0.1-alpha.3]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/0.0.1-alpha.2...0.0.1-alpha.3
[0.0.1-alpha.2]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/0.0.1-alpha...0.0.1-alpha.2
[0.0.1-alpha]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/0.0.1-alpha
[Unreleased]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/compare/1.1.1...HEAD
[1.1.1]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/1.1.1
[1.1.0]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/1.1.0
[1.0.0]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/1.0.0
[0.0.1-alpha.6b]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/0.0.1-alpha.6b
[0.0.1-alpha.6]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/0.0.1-alpha.6
[0.0.1-alpha.5]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/0.0.1-alpha.5
[0.0.1-alpha.4]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/0.0.1-alpha.4
[0.0.1-alpha.3]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/0.0.1-alpha.3
[0.0.1-alpha.2]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/0.0.1-alpha.2
[0.0.1-alpha]: https://github.com/datacute/EmbeddedResourcePropertyGenerator/releases/tag/0.0.1-alpha
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Copyright>Copyright © Stephen Denne 2024, 2025</Copyright>
<Company>Datacute</Company>
<PackageProjectUrl>https://github.com/datacute/EmbeddedResourcePropertyGenerator</PackageProjectUrl>
<PackageReleaseNotes>See full release notes and changelog: $(PackageProjectUrl)/blob/main/CHANGELOG.md</PackageReleaseNotes>
<PackageReleaseNotes>See full release notes and changelog: $(PackageProjectUrl)/blob/main/CHANGELOG.md</PackageReleaseNotes>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>

Expand Down
10 changes: 4 additions & 6 deletions EmbeddedResourceProperty.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
LICENSE = LICENSE
README.md = README.md
Pipelines.md = Pipelines.md
global.json = global.json
versionsuffix.ci.props = versionsuffix.ci.props
versionsuffix.local.props = versionsuffix.local.props
versionsuffix.release.props = versionsuffix.release.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EmbeddedResourcePropertyGenerator.Attributes", "EmbeddedResourcePropertyGenerator.Attributes\EmbeddedResourcePropertyGenerator.Attributes.csproj", "{73A7F255-8275-41A3-8A2A-E70FE85DD0B5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -39,10 +41,6 @@ Global
{5B687AED-BC94-489C-87EF-46E9C859BA74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B687AED-BC94-489C-87EF-46E9C859BA74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B687AED-BC94-489C-87EF-46E9C859BA74}.Release|Any CPU.Build.0 = Release|Any CPU
{73A7F255-8275-41A3-8A2A-E70FE85DD0B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73A7F255-8275-41A3-8A2A-E70FE85DD0B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73A7F255-8275-41A3-8A2A-E70FE85DD0B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73A7F255-8275-41A3-8A2A-E70FE85DD0B5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\EmbeddedResourcePropertyGenerator.Attributes\EmbeddedResourcePropertyGenerator.Attributes.csproj" />
<ProjectReference Include="..\EmbeddedResourcePropertyGenerator\EmbeddedResourcePropertyGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="Verify.SourceGenerators" Version="2.5.0" />
Expand All @@ -26,7 +26,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\EmbeddedResourcePropertyGenerator.Attributes\EmbeddedResourcePropertyGenerator.Attributes.csproj" />
<ProjectReference Include="..\EmbeddedResourcePropertyGenerator\EmbeddedResourcePropertyGenerator.csproj" />
</ItemGroup>

Expand Down
Loading