Skip to content

Commit

Permalink
publish using github release version (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gita Vahdatinia authored Nov 28, 2022
1 parent bf25050 commit 5bce7d0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
21 changes: 15 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ parameters:

workflows:
lint-pack:
when:
not:
equal: [ main, << pipeline.git.branch >> ]
jobs:
- orb-tools/pack
# https://www.shellcheck.net/wiki/SC2002
Expand All @@ -48,8 +51,8 @@ workflows:
requires:
- orb-tools/pack
- shellcheck/check
vcs-type: github
- orb-tools/continue:
vcs-type: << pipeline.project.type >>
- orb-tools/continue: # continues to .circleci/test-deploy.yml
context:
- dockerhub
- orb-publishing
Expand All @@ -64,16 +67,22 @@ workflows:
ignore: main

publish:
when: << pipeline.git.tag >>
jobs:
- orb-tools/pack:
filters:
tags:
only: /^v.*/
- orb-tools/publish:
requires:
- orb-tools/pack
context:
- dockerhub
- orb-publishing
- util
filters:
branches:
only:
- main
orb-name: coda/utils
pub-type: production
vcs-type: << pipeline.project.type >>
filters:
tags:
only: /^v.*/
3 changes: 3 additions & 0 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:

workflows:
test-deploy:
when:
not:
equal: [ main, << pipeline.git.branch >> ]
jobs:
- integration-test-notify:
context:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
[Example Usage](src/examples/example.yml)
### 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 fore _feature branch_ to `main`.
* When ready to publish a new production version, create a Pull Request from from _feature branch_ to `main`.
* When your branch is merged into `main` create a new release version off of `main`. This can be achieved by going to [circleci-utils](https://github.com/coda/circleci-utils/releases/new) release page and clicking on `Draft a new release`.
Make sure the release version is in the format of `vX.X.X`. This is version number that will match the new orb version.

### How to Publish Dev Version

Push your branch and CI will trigger dev published version of orb with the commit hash as the version.

### How to Publish Dev VersionManually
### How to Publish Dev Version Manually

To manually pack your `orb.yml`, you can run `circleci orb pack . > orb.yml` at the `@orb.yml` level.

Expand Down

0 comments on commit 5bce7d0

Please sign in to comment.