Skip to content

Commit 5fcace6

Browse files
committed
📦️ Update release workflow to pack projects excluding SourceGenerators without symbols
1 parent 27f0bda commit 5fcace6

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

‎.github/workflows/release.yml‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,28 @@ jobs:
4242
run: dotnet build --configuration Release /p:Version=${RELEASE_VERSION}
4343
- name: Test
4444
run: dotnet test --configuration Release /p:Version=${RELEASE_VERSION} --no-build
45-
- name: Pack
46-
run: dotnet pack --configuration Release /p:Version=${RELEASE_VERSION} --output ${{ env.NuGetDirectory }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
45+
#- name: Pack
46+
# run: dotnet pack --configuration Release /p:Version=${RELEASE_VERSION} --output ${{ env.NuGetDirectory }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
47+
- name: Pack projects except SourceGenerators
48+
run: |
49+
for proj in $(find . -name '*.csproj'); do
50+
if [[ "$proj" != *SourceGenerator* ]]; then
51+
echo "Packing $proj"
52+
dotnet pack "$proj" \
53+
--configuration Release \
54+
/p:Version=${RELEASE_VERSION} \
55+
--output ${{ env.NuGetDirectory }} \
56+
-p:IncludeSymbols=true \
57+
-p:SymbolPackageFormat=snupkg
58+
else
59+
echo "Packing $proj without symbols"
60+
dotnet pack "$proj" \
61+
--configuration Release \
62+
/p:Version=${RELEASE_VERSION} \
63+
--output ${{ env.NuGetDirectory }} \
64+
-p:IncludeSymbols=false
65+
fi
66+
done
4767
- name: Push
4868
run: dotnet nuget push ${{ env.NuGetDirectory }}/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY}
4969
env:

‎src/Sidio.Mediator.SourceGenerator/Sidio.Mediator.SourceGenerator.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2020
<Description>A source generator for a centralized IMediator implementation.</Description>
2121
<PackageTags>mediator,mediator-pattern,request,requesthandler,source-generator</PackageTags>
22-
<IncludeSymbols>true</IncludeSymbols>
22+
<IncludeSymbols>false</IncludeSymbols>
2323
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2424
<Deterministic>true</Deterministic>
2525
<PackageReleaseNotes>https://github.com/marthijn/Sidio.Mediator/releases</PackageReleaseNotes>

0 commit comments

Comments
 (0)