apparently, the album was complete in early 2015, and he worked on the videos and album release knowing he was terminal.
he planned them as a "goodbye gift" to his fans, hence the release 2 days prior to his death.
(that's per the Bowie management)
Hadn't heard this. Warren Zevon released an album called "My Ride's Here," which rather eerily preceded his being diagnosed with cancer (the title song has to do with dying). But he lived long enough to record "The Wind," as well.