Maybe.. kind of.

The Doom source code was originally released under a non-commercial license that was weirdly restrictive and it was eventually re-released under GPL. The Quake source code was released under GPL from the beginning.

If Valve really wanted to release HL1/GoldSrc source code, they could re-base to the GPL quake source code and release their changes as GPL as well. This would be a miserable job because the remaining quake code is probably scattered across the codebase in weird orphaned fragments, but afaik it would be completely legal.

e: oh yeah if the shambling zombie that is Sierra still holds any rights over HL1 then god knows what the IP situation is with that property