The story you're describing is "Mother of Invention" by Tom Godwin.
Five fortune hunters are marooned on Aurora - a hitherto unknown earth
type world full of diamonds - diamond boulders, diamond encrusted
rocks, diamond saturated dust, ... They'll soon find how anti-life too
much diamond can be.
Their spaceship is rendered useless by explosion triggered by diamond
dust, & the world they're on is due for apocalypse some 7 months down
the line - to be caught in a nova as an alien sun hits this carbon
rich world & then the nova absorbs the local sun.
After some preliminaries, we are presented with two choices: either
they find a local source of uranium, or they must invent antigravity!
Of course, our heroes are made to choose the latter. And they will not
only invent the antigravity in given time, but take their fortune home
- their antigravity machine is powerful enough to take whole of the world they're on home!
Variety SF: Review - The Mother of Invention
The story has been anthologised several times but it's likely you read it in the (repeatedly reprinted) Spectrum 5 collection.