CLI command to create Github tags for your repos
Setting tags in Github is not hard, but it seems like something that could be automated as we need to use the UI for that.
How it works
Puppeteer library to log in your Github account and generate a new tag
0.2.0 for the repo where the command
tag 0.2.0 is executed.
If no argument is passed, then it will automatically generate minor tag release.
In other words, if the current tag is
0.1.0 and command
tag is executed, then this will result in automatic generation of
yarn global add tag-fn
- Setting credentials
Puppeteer library, this means that the library needs information about your Github username and password. Feel free to explore the code of
Tag-fn to ensure that this sensitive data is not at risk.
One option is set Github credentials is to set
GITHUB_PASSWORD as your enviroinment variables.
The other possibility is to run once the command
tag init and fill the form with your Github credentials.
How to use?
Command is of type
tagValueis omitted, then default value of
minorwill be applied.
If there is no previous tag, then the new tag will be
minor). If you run
tag patch, then the published tag will be
tagValuecan be just a text like
tagValuecan either specify explicit version(
tag 4.2.0) or be one of
when tagValue === 'patch'
when tagValue === 'minor'
when tagValue === 'major'
You can run the command in the project root folder or any project subfolder.
It makes sense to have a clean repo state before running the