This is a summary of the steps used to release a new version of Games, retro-gtk and libmanette. It sums-up and completes the steps from the global releasing guidelines.
Excluding Files from Distribution
To work around the lack of file exclusion in Meson's dist rule using Git, list the files to ignore when producting the tarball in the .gitattributes file.
Here is an example of a .gitattributes file:
flatpak export-ignore .editorconfig export-ignore .gitattributes export-ignore .gitignore export-ignore .gitlab-ci.yml export-ignore
Commit your changes to that file, if any.
Producing the Version
Ensure you are on the latest version of the master branch.
Update the version in meson.build.
Update the NEWS file following the existing format, it should contain:
- user-facing changes like new features, UI changes and translation changes
- developer-facing changes like API changes
- packager-facing changes like new dependencies and build system changes
- nothing about what doesn't go into the tarball, like Flatpak packaging, editor rules, git files and CI files.
Try to talk about all the releavant changes, but no more. Be concise.
Commit these changes with the Version 3.2.1 message.
Variables
The following steps need the following variables:
$ export PROJECT=my-project # The project's name $ export VERSION=3.2.1 # The project's version $ export REMOTE=gnome # The project's upstream remote in your git repo $ export USER=mygnomeid # Your GNOME user ID
Change them to match your project, your repo, and yourself.
Some steps can be automated, e.g.:
$ export VERSION=$(grep -m 1 version meson.build | grep -P -o "[0-9]+\\.[0-9]+\\.[0-9]+")
Pushing the Version
Do a $ git push. If that fails because someone has pushed since you last updated, then you need to rebase, maybe you need update the NEWS file, and push again.
Produce the 3.2.1 tag with the Version 3.2.1 message, then push it to the upstream remote.
$ git tag -a $VERSION -m "Version $VERSION" $ git push $REMOTE $VERSION
Producing the Tarball
To work around the lack of file exclusion in Meson's dist rule using Git, run this command to generate the compressed tarball following GNOME's conventions and excluding the files listed as ignored in .gitattributes:
$ git archive --prefix $PROJECT-$VERSION/ -o $PROJECT-$VERSION.tar HEAD && xz -f $PROJECT-$VERSION.tar
It will produce my-project-3.2.1.tar.xz.
Publishing the Tarball
To publish the tarball:
$ scp $PROJECT-$VERSION.tar.xz $USER@master.gnome.org: $ ssh $USER@master.gnome.org ftpadmin install $PROJECT-$VERSION.tar.xz