I have had migraines triggered by neck and shoulder tension. But dehydration could also be an issue.

Does your shoulder only tense up when you're riding uphill, or during the whole ride?