The script contained in this repository is used to automate the RELEASE process at any software whose code is stored in Github.
I define a process or RELEASE that consists in the following steps:
-
Every developer creates features and pull requests at the
dev
branch. -
Before every release, you will have multiple pull requests created. Each one fixing a bug or adding a new feature.
-
When you are ready to create the RELEASE, first create a pull request with source
dev
and targetmaster
. -
After merging the code in master, you can run the ./generate_release.py script.
-
Create an environment variable named
GITHUB_ACCESS_TOKEN
that must contain the access token, to allow this script to make requests to the Github API and gather your pull requests information. Here you can find the instructions for generating this token, in case you don't have it. -
Replace the variables inside the script:
- USER: Your github user's name
- REPOSITORY: The repository that you will use to generate the Release
- BRANCH: Normally this may be filled with
dev
, but feel free to use the branch that contains the pull requests
-
Update the initial version of your software, by replacing the number of the version at the
version.txt
file. It must start withv.
, so please don't remove it. -
You're ready to run the script
python3 ./generate_release.py
- Verify the latest tag created
git tag | sort -V | tail -1
- Go to your repository and verify the latest release and tags created. Also see the contents that were auto-generated using your pull requests information.
Go to this URL. Replace with your repo information:
https://github.com/${user}/${repository}/releases
- Have fun! You have just saved some minutes of life :)