Skip to content

myhelix/taggy-orb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myhelix/taggy

CircleCI Build Status CircleCI Orb Version GitHub License CircleCI Community

The Taggy Workflow

This orb has a job and a command, both named cut-release. The purpose of this orb is to provide the tooling to automatically handle versioning for minor or patch level changes following SemVer.

cut-release will check on the latest tag and bump minor or patch based on the parameter passed to the orb.

- taggy/cut-release:
  name: "Cut release - patch"
  release-type: patch
  filters:
    branches:
      only:
        - /hotfix[^a-zA-Z].*/

The tag is then pushed back up to the remote. To avoid conflicts the tag must not already exist. This only becomes a problem when applying multiple hotfixes to a minor version. Hence for sequential hotfixes, branch off of the last hotfix that was applied.

Getting started

An initial tag must be set. git checkout main; git pull; git tag v0.0.0; git push --tags

Add the taggy orb to your circle config and setup a build and deploy workflow to handle automatic version bumps and releases

Sample Workflow

orbs:
  cdk: myhelix/[email protected]
  taggy: myhelix/[email protected]

tag_filters: &tag_filters
  tags:
    only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ # matches tags like "v1.10.38"
  branches:
    ignore: /.*/  # ignore all branches

workflows:
  build: # The build workflow builds and cuts a release
    jobs:
      - cdk/build:
          name: "Install NPM packages for cdk"

      - hold:
          name: "Approval: Cut release"
          type: approval
          filters:
            branches:
              only:
                - main
                - /hotfix[^a-zA-Z].*/

      - taggy/cut-release:
          name: "Cut release - patch"
          requires:
            - "Approval: Cut release"
          release-type: patch
          filters:
            branches:
              only:
                - /hotfix[^a-zA-Z].*/

      - taggy/cut-release:
          name: "Cut release - minor"
          requires:
            - "Approval: Cut release"
          release-type: minor
          filters:
            branches:
              only:
                - main
  deploy: # The deploy workflow runs the deploy step when cut-release has created a new release
    jobs:
      - cdk/deploy:
          name: "Deploy cdk"
          filters:
            <<: *tag_filters

CONTRIBUTING - How to Publish

  • Create and push a branch with your new features.
  • When ready to publish a new production version, create a Pull Request from feature branch to master.
  • The title of the pull request must contain a special semver tag: [semver:<segment>] where <segment> is replaced by one of the following values.
Increment Description
major Issue a 1.0.0 incremented release
minor Issue a x.1.0 incremented release
patch Issue a x.x.1 incremented release
skip Do not issue a release

Example: [semver:major]

  • Squash and merge. Ensure the semver tag is preserved and entered as a part of the commit message.
  • On merge, after manual approval, the orb will automatically be published to the Orb Registry.

For further questions/comments about this or other orbs, visit the Orb Category of CircleCI Discuss.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages