I recently produced my first release of the Optimizely module for Drupal.org. There are several steps involved, which I am documenting here in a brief overview of the process specifically for Drupal.org.
The sources listed below give a lot more of the details.
I am assuming that you're familiar with the basic concepts and commands for using git to clone a repo, make commits, manage branches, etc.
(0) Create a release branch within your development repo that will contain your work. You may be using an existing branch, in which case you don't need to do this.
The required convention for naming branches for contrib modules looks like these examples.
The first part, before the hyphen, refers to the major version of Drupal core. The second part refers to the major version of the module you're working on.
Exact version numbers for specific releases are provided in a separate step by doing a git tag.
N.B. On Drupal.org, we are told not to use the master branch.
(1) When the code in your dev repo is ready for release, git push the branch to the repo on Drupal.org.
(2) In your dev repo, git tag with a tag such as the following.
The recognized suffixes are: unstable alpha beta rc
These must be lowercase, and there must be a number appended to the suffix if you use one.
$ git tag 8.x-2.14-beta1
After tagging the code in the dev branch, git push the tag to Drupal.org.
$ git push origin 8.x-2.14-beta1
(3) On the module's page on Drupal.org, go to Edit > Releases. Click on Add new release to create a new release.
(4) Finally, on Edit > Releases, check Show snapshot release if you want the release to appear on the module's front page in the list of releases. You may not need to do this if it's been done before for the branch you're working on.
It may take a minute or two for the new release to show up on the site.
On the Version control tab of a module's page on Drupal.org there are excellent instructions that include actual commands to use. For example,
Creating and testing full projects and releases
Release naming conventions
Creating a project release