Package: fastrelease
fastreleaseAuto-generated tagged releases, and release notes (from GitHub issues).fastreleaseprovides two commands that you can run from your shell:nbdev_changelog: creates a CHANGELOG.md file from closed and labeled GitHub issuesnbdev_tag_release: tags and creates a release in GitHub for the current version.Be sure to check out the full documentation atfastrelease.fast.ai. Here's a brief demonstration of how to usefastrelease. This demo first creates an issue using theghcommand line tool, and then closes it usinggit; you can also use GitHub's web interface for both of these tasks.Installfastreleasehas only one small prerequisite (fastcore) and will run on Python 3.6 or later. You can install from pip:pip install fastrelease...or conda:conda install -c fastai fastreleaseHow to useSet upFirst, create asettings.inifile with the following contents (replacing the values as described below):[DEFAULT]
lib_name = fastrelease
user = fastai
version = 0.0.1Setlib_nameto the name of GitHub repo,userto the owner of that repo, andversionto the version number of your library. (Note that if you usenbdevthen you'll already have this information, so you don't need to do anything further to set it up.)You'll need to get a GitHubpersonal access tokenif you haven't already. To do so,click hereand enter "fastrelease" in the "Note" section, and click therepocheckbox.Then click "Generate Token" at the bottom of the screen, and copy the token (the long string of letters and numbers shown). You can easily do that by clicking the little clipboard icon next to the token.Paste that token into a file calledtokeninto the root of your repo. You can run the following in your terminal (cdto the root of your repo first) to create that file:echo XXX > tokenReplaceXXXabove with the token you copied. Also, ensure that this file isn't added to git, by running this in your terminal:echo token >> .gitignoreCreating release notesNow you're ready to create your release notes. These are created in a file calledCHANGELOG.md. Here's an example of what it creates:nbdev CHANGELOG.All issues with the labelbug,enhancement, orbreakingthat have been closed in your repo since your last release will be added to the top of this file. If you haven't made any releases before, then all issues with those labels will be included.Therefore, before you create or updateCHANGELOG.md, go to your GitHub issues page, removeis:openfrom the filter, and label any issues you want included with one of the labels above. When you've done that, you can create or update your release notes by running in your terminal:fastrelease_changelogThe titles and bodies of each issue will be added. OpenCHANGELOG.mdin your editor and make any edits that you want, and then commit the file to your repo (remember togit addit!)Tagging a releaseYou should now tag a release. This will create a tag in GitHub with your current version number insettings.ini, and will then make it into a release, using your latest release notes as the description of the release:fastrelease_releaseAfter you run this, be sure to increment your version number insettings.ini. You can either edit it manually, or if you use nbdev it can be done for you by running:nbdev_bump_versionDoing both (creating release notes, and tagging a release)To complete both of the steps above, run:fastreleaseSee the screencast above for a demonstration of this.