user9174: According to Wikipedia, when a pawn advances to the eighth rank, the pawn is promoted as a part of the move.
However, this doesn't make it clear whether I am obliged to promote the pawn if it gets to the eighth rank.

user1485: Yes, it is obligatory.
From FIDE's Laws of Chess §3.7e (Link):

e. When a player, having the move, plays a pawn to the rank furthest from its starting position, he must exchange that pawn as part of the same move for a new queen, rook, bishop or knight of the same colour on the intended square of arrival.


9174: <p>According to Wikipedia, when a pawn advances to the eighth rank, the pawn is promoted as a part of the move.</p>

<p>However, this doesn't make it clear whether I am obliged to promote the pawn if it gets to the eighth rank.</p>
 1485: <p>Yes, it is obligatory.</p>

<p>From FIDE's Laws of Chess §3.7e (<a href="https://www.fide.com/fide/handbook.html?id=171&amp;view=article" rel="noreferrer">Link</a>):</p>

<blockquote>
  <p>e. When a player, having the move, plays a pawn to the rank furthest from its starting position, he must exchange that pawn as part of the same move for a new queen, rook, bishop or knight of the same colour on the intended square of arrival.</p>
</blockquote>
