Skip to content

Publishing a new version

Dov Murik edited this page Jun 18, 2024 · 6 revisions

This is the process maintainers need to follow to publish a new sev-snp-measure version.

One-time setup

  1. Make sure you have a GPG key which is registered with your github account.
  2. Your .git/config should have something like:
    [user]
      name = ...
      email = ...
      signingkey = ... # the gpg key ID
    [gpg]
      program = /path/to/bin/gpg
    
  3. Make sure you are part of the sev-snp-measure PyPi project, and get a PyPi API token.
  4. Install Python dependencies needed for the publishing process:
    pip install build twine
    

Publishing a new version

  1. Pull latest main.
  2. Make sure CHANGELOG.md is up-to-date with items under the top-most Unreleased section. If not, add the relevant items and push to main.
  3. Make the following code changes (see example in commit c3bf176d5):
    • CHANGELOG.md: Change Unreleased to the new version number and release date, and create a new Unreleased section on top.
    • setup.cfg: Update version
    • sevsnpmeasure/cli.py: Update version
  4. Commit these changes with commit message:
    Version X.Y.Z
    
    Signed-off-by: First Last <[email protected]>
    
  5. Push to main.
  6. Tag the new version (it will ask you for the GPG passphrase):
    git tag vX.Y.Z -a -s -m "Version X.Y.Z"
    
  7. Push the tag:
    git push --tags
    
  8. In the Releases page, create a new release from the new vX.Y.Z tag. In the description, paste the relevant section from CHANGELOG.md.
  9. Create the Python packages:
    make build_packages
    
  10. Publish the packages to PyPi:
    make publish_packages
    
    When it asks for username, literally type __token__ ; for password, paste your PyPi API token (which starts with pypi-).
  11. Check the project page in PyPi and make sure it shows the new published version.
  12. If there are any open/closed issues in sev-snp-measure that this release fixes, open them and add a comment mentioning that the issue should be solved by X.Y.Z which was just released on PyPi.
Clone this wiki locally