forked from anderskaplan/Pseudolocalizer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDirectory.Build.targets
22 lines (22 loc) · 1.04 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<Project>
<Target Name="SetNuGetPackageOutputs" AfterTargets="Pack" Condition=" '$(GITHUB_OUTPUT)' != '' ">
<PropertyGroup>
<_PackageNamesPath>$(ArtifactsPath)\package-names.txt</_PackageNamesPath>
</PropertyGroup>
<ReadLinesFromFile File="$(_PackageNamesPath)">
<Output TaskParameter="Lines" ItemName="_PackageNames" />
</ReadLinesFromFile>
<ItemGroup>
<_PackageNames Include="$(PackageId)" />
</ItemGroup>
<RemoveDuplicates Inputs="@(_PackageNames)">
<Output TaskParameter="Filtered" ItemName="_UniquePackageNames" />
</RemoveDuplicates>
<PropertyGroup>
<_UniquePackageNames>@(_UniquePackageNames->'%(Identity)', ',')</_UniquePackageNames>
</PropertyGroup>
<WriteLinesToFile File="$(_PackageNamesPath)" Lines="@(_UniquePackageNames)" Overwrite="true" WriteOnlyWhenDifferent="true" />
<WriteLinesToFile File="$(GITHUB_OUTPUT)" Lines="package-names=$(_UniquePackageNames)" />
<WriteLinesToFile File="$(GITHUB_OUTPUT)" Lines="package-version=$(Version)" />
</Target>
</Project>