Use the "Visual Studio 18 2026" CMake generator in all Windows jobs
of the GitHub Actions workflow. After the "windows-11-arm" label was
repointed to a new image that contains Visual Studio 2026 only, the
previous version-exact generator on Windows ARM64 no longer matched
any installed instance.
Without an explicit declaration, the workflow token carries write
access to the repository on push events, although our project only
needs read access. Restrict the grant to limit what a compromised
action can reach.
Also harden the dependency step: replace context expressions such as
`${{ github.ref }}` with environment variables to prevent expansion
as shell code.
Resolves: https://github.com/pnggroup/libpng/pull/879
Reviewed-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
The "windows-latest" alias was repointed to a Windows Server 2025 image
that ships Visual Studio 2026 only, which prevented the version-exact
generator "Visual Studio 17 2022" from matching any installed instance.