A few lines of bash to automate git tags, and github releases with a change log, for a CD project. Viable only if you do not care about semantic versioning in the context of your project.
- A git repository exists in your current working directory
- git is installed
- GITHUB_ACCESS_TOKEN env var is set.
- REPO_NAME env var is set, or passed in as an argument (see usage)
- Currently depends on jq
- Outputs the changelog that would be used in the published release, without tagging commits or submitting a real release.
- Outputs the latest release tag
- Creates a release tag, which is pushed
- Submits a release to github, using your GITHUB_ACCESS_TOKEN
.swiggityrc can contain:
- REMOTE The github remote, defaults to origin
- REPO_NAME
The <org_name/repo_name> to push releases to. If set, you do not need to provide this as an argument to
describe
orpush
# If not set, you can still pass this as an argument to `swiggity push`
REPO_NAME=<org_name/repo_name>
# If not set, defaults to `origin`
REMOTE=canon
I don't really know bash, so if you would like to make this better, please feel free to open a pull request.