@homerun/ted-the-releaser v1.3.3
Features
- Semantic Versioning release tags.
- Fully automated changelog and release notes creation.
- Notify developers and users of new releases on associated GitHub issues and pull requests.
- Post release notifications on Slack channels.
- Compatible with any project regardless the tech stack.
Requirements
- Use formalized commit message convention to document changes in the codebase.
- Use GitHub workflow as development strategy.
How to use Ted The Releaser
Ted is available as a npm package that exposes a command line tool called ted
. Install the package globaly first:
npm install -g @homerun/ted-the-releaser
And from your project, ask Ted for help:
cd path/to/repo
ted -h
How to create a release
By default, ted
assumes that you are using GitHub workflow on your project, where master is the main branch and releases are done via git tags. To create a release, run the following command:
ted release
Ted will checkout the latests changes, determine the next release tag, show the changelog and ask for confirmation before releasing. Please notice that Ted will not create a GitHub release at this point, it only shows the release notes for your :
[10:41:08 AM] [git] › ℹ Checking out develop branch...
[10:41:08 AM] [git] › ℹ Pulling latest changes...
[10:41:10 AM] [git] › ℹ Fetching latest tags...
[10:41:11 AM] [git] › ℹ Determine latest tag...
[10:41:12 AM] [release-notes] › ℹ Determine next tag...
[10:41:12 AM] [release-notes] › ℹ Creating release notes...
## v3.14.0 (2019-12-31)
### Bug Fixes
* increase timeout for migrations ([7cec3d6](https://github.com/homerunco/laravel4-app/commit/7cec3d64af4828c3144f1c52ccb200c6eb7ba8ca))
* restore CodeDeploy timeouts ([201c21b](https://github.com/homerunco/laravel4-app/commit/201c21b06f4f9224a4cffb2bf5295a0ae56b5fc3))
* **articles-list:** dont escape text in link ([97d30ac](https://github.com/homerunco/laravel4-app/commit/97d30ac38b623aceab5273d26406f8de20c288a6))
* **talent-notes:** allow posting in closed vacancy when talent pool note ([fff8bbb](https://github.com/homerunco/laravel4-app/commit/fff8bbb8895accbf31f52a63c09505a05815eb4a))
### Performance Improvements
* use route pattern for domain groups ([#752](https://github.com/homerunco/laravel4-app/issues/752)) ([139e39d](https://github.com/homerunco/laravel4-app/commit/139e39d5379dadfbabb841d5c2d2ad9e5d4a47d6))
? Do you want to release these changes? (Y/n)
If you agree with the changes, Ted will create and push the new git tag. You must decide how to deploy your application based on the new tag.
How to create a GitHub release with release notes
Assuming that you are using circleci to release your application, this is how a release notes job could look like. Notice that we are creating the release on GitHub after a successful release, but it could be done in parallel as well.
Important: declare a environment variable in circleci called GH_TOKEN
, you can find the value in 1Password for ted-the-automator
user.
version: 2
jobs:
production-deploy:
docker:
- image: circleci/python:2.7-jessie
steps:
- checkout
# Specific steps for your project
- ...
release-notes:
docker:
- image: circleci/node:10.16.3
steps:
- checkout
- run:
name: Create release notes
command: npx @homerun/ted-the-releaser github-release
workflows:
version: 2
test_build_deploy:
jobs:
- production-deploy:
requires:
- production-build
filters:
tags:
# Only create a production deploy for tags with format vX.X.X
only: /^v\d+\.\d+\.\d+$/
branches:
# Don't run on branches
ignore: /.*/
- release-notes:
requires:
- production-deploy
filters:
tags:
# Only create release notes for tags with format vX.X.X
only: /^v\d+\.\d+\.\d+$/
branches:
# Don't run on branches
ignore: /.*/
Publish the package
Bump the version in package.json
file and run npm install
, it will also update the version name in package.lock
file. Create a new commit in the following format: chore(release): X.Y.Z [skip ci]
and a tag with git tag vX.Y.Z
. Push the changes with git push --follow-tags
.
To be able to publish new versions of this package to NPM, login into our Homerun npm account (you can find the credentials in 1Password), and publish it with public access. You should see the new version being published to NPM.
npm login
npm publish --access public