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
14 changes: 14 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ jobs:
- name: Restore
run: dotnet restore ConvertApi/ConvertApi.csproj

# The package's readme is the repository's README.md. Its sign-up links say utm_source=github; the
# packed copy says utm_source=nuget, so visits from the nuget.org package page are counted apart.
# Only this run's checkout changes, never the repository.
- name: Tag the README links for nuget.org
run: |
set -euo pipefail
sed -i 's/utm_source=github/utm_source=nuget/g' README.md
echo "Links tagged utm_source=nuget: $(grep -o 'utm_source=nuget' README.md | wc -l)"

- name: Build and pack
env:
VERSION: ${{ steps.tag.outputs.version }}
Expand All @@ -150,6 +159,11 @@ jobs:
NUSPEC=$(unzip -p "$PKG" "$PACKAGE_ID.nuspec")
grep -q "<version>$VERSION</version>" <<<"$NUSPEC" || { echo "::error::$PKG does not carry version $VERSION"; exit 1; }
grep -q "commit=\"$SHA\"" <<<"$NUSPEC" || { echo "::error::$PKG does not record commit $SHA"; exit 1; }
README=$(unzip -p "$PKG" README.md)
if grep -q 'utm_source=github' <<<"$README"; then
echo "::error::The README.md in $PKG still has utm_source=github links"
exit 1
fi
echo "$NUSPEC" | grep -E '<(id|version|repository|dependency) '

# Trusted Publishing: once a nuget.org policy for this repository, publish.yml and the nuget
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ The format is based on Keep a Changelog and this project adheres to Semantic Ver
- `SaveFilesAsync(outputDirectory)` creates the folder if it does not exist, instead of throwing
`DirectoryNotFoundException`. An empty path still means the current directory.
- Unit tests (`ConvertApi.Tests`, NUnit) run in the `build` check of every pull request.
- The package readme on nuget.org is the repository's `README.md`; the separate `ConvertApi/docs/README.md`
had drifted and is removed. The publish workflow tags the packed copy's links `utm_source=nuget`.
- README: a quick start, C# task sections, and snippets that run as copied on Windows, macOS and Linux.
They save to a relative `output` folder they create, use `ConvertApiFile` (not `ProcessedFile`),
`FitToSize` (not the ignored `ScaleImage` and `ScaleProportions`) and the current converter names.

## [3.2.2] — 2026-10-26

Expand Down
6 changes: 3 additions & 3 deletions ConvertApi/ConvertApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
</ItemGroup>

<ItemGroup>
<None Include="docs\README.md" Pack="true" PackagePath="\">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<!-- nuget.org shows the repository's own README.md, so the package page and GitHub cannot drift apart.
The publish workflow rewrites utm_source=github to utm_source=nuget in the packed copy. -->
<None Include="..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Loading
Loading