I presume Bobby Bob is correct with the Dubliners song posted.
Ian, That song Shanties by the Way is found in New Zealand but is of Australian origins. The gold miners practically commuted between the two countries going form gold rush to gold rush. Charles Thatcher was an Englishman who quickly realised it was much easier work getting gold miners to throw gold nuggets onto the stage than digging the bloody stuff out of rocks!
He performed in music halls in both countries with topical (and occasionally downright insulting songs) but he did not write this one.
Off the top of my head I seem to remember the name Thomas Spencer, but I can look it up and get back to you. The verses were originally published in NSW country paper and picked up by the folk. The song is quite popular around here and goes to the Irish tune The Spanish Lady ... the one starting "As I went out of Dublin City ...".