-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
69 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,50 +2,13 @@ version: 2.1 | |
description: Creates and updates the CHANGELOG.md file | ||
|
||
orbs: | ||
changelog: | ||
executors: | ||
changelog: | ||
docker: | ||
- | ||
image: circleci/ruby:2.5-node | ||
jobs: | ||
changelog: | ||
parameters: | ||
gitemail: | ||
description: The git committer's email | ||
type: string | ||
default: [email protected] | ||
gitusername: | ||
description: The git committer's username | ||
type: string | ||
default: aeneasr | ||
gitauthtoken: | ||
description: The git committer's username | ||
type: string | ||
executor: changelog | ||
steps: | ||
- run: git config --global push.default matching | ||
- checkout | ||
- run: gem install github_changelog_generator -v 1.14.3 | ||
- run: sudo npm i -g doctoc | ||
- restore_cache: | ||
keys: | ||
- changelog-v1 | ||
- run: github_changelog_generator -u $CIRCLE_PROJECT_USERNAME -p $CIRCLE_PROJECT_REPONAME -o CHANGELOG.md --token <<parameters.gitauthtoken>> --cache-file /tmp/github_changelog_generator | ||
- save_cache: | ||
key: changelog-v1 | ||
paths: | ||
- "/tmp/github_changelog_generator" | ||
- run: doctoc CHANGELOG.md | ||
- run: git config --global user.email "<<parameters.gitemail>>" | ||
- run: git config --global user.name "<<parameters.gitusername>>" | ||
- run: git add CHANGELOG.md | ||
- run: | | ||
git commit -m "Update CHANGELOG [ci skip]" -- CHANGELOG.md | ||
- run: git push origin | ||
orb-tools: circleci/[email protected] | ||
|
||
workflows: | ||
changelog: | ||
btd: | ||
jobs: | ||
- changelog/changelog: | ||
gitauthtoken: $GITHUB_TOKEN | ||
- orb-tools/publish: | ||
orb-path: src/changelog.yml | ||
orb-ref: ory/changelog@dev:${CIRCLE_BRANCH} | ||
publish-token-variable: "$CIRCLECI_DEV_API_TOKEN" | ||
validate: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* | ||
**Table of Contents** | ||
|
||
- [Change Log](#change-log) | ||
|
||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
||
# Change Log | ||
|
||
This Change Log was automatically generated | ||
|
||
|
||
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
version: 2.1 | ||
description: Creates and updates the CHANGELOG.md file | ||
|
||
orbs: | ||
changelog: | ||
executors: | ||
changelog: | ||
docker: | ||
- | ||
image: circleci/ruby:2.5-node | ||
jobs: | ||
generate: | ||
parameters: | ||
gitemail: | ||
description: The git committer's email | ||
type: string | ||
default: [email protected] | ||
gitusername: | ||
description: The git committer's username | ||
type: string | ||
default: aeneasr | ||
gitauthtoken: | ||
description: A GitHub API Token | ||
type: env_var_name | ||
default: GITHUB_TOKEN | ||
executor: changelog | ||
steps: | ||
- run: git config --global push.default matching | ||
- checkout | ||
- run: gem install github_changelog_generator -v 1.14.3 | ||
- run: sudo npm i -g doctoc | ||
- restore_cache: | ||
keys: | ||
- changelog-v1 | ||
- run: github_changelog_generator -u $CIRCLE_PROJECT_USERNAME -p $CIRCLE_PROJECT_REPONAME -o CHANGELOG.md --token ${<<parameters.gitauthtoken>>} --cache-file /tmp/github_changelog_generator | ||
- save_cache: | ||
key: changelog-v1 | ||
paths: | ||
- "/tmp/github_changelog_generator" | ||
- run: doctoc CHANGELOG.md | ||
- run: "sed -i 's/\\*\\*Table of Contents.*/**Table of Contents**/' CHANGELOG.md" | ||
- run: "sed -i 's/\\*This Change Log was.*/This Change Log was automatically generated/' CHANGELOG.md" | ||
- run: git config --global user.email "<<parameters.gitemail>>" | ||
- run: git config --global user.name "<<parameters.gitusername>>" | ||
- run: git add CHANGELOG.md | ||
- run: | | ||
git commit -m "Update CHANGELOG [ci skip]" -- CHANGELOG.md || true | ||
- run: git push origin || true | ||
|
||
examples: | ||
changelog: | ||
description: Generate and commit the changelog | ||
usage: | ||
version: 2.1 | ||
orbs: | ||
foo: ory/[email protected] | ||
workflows: | ||
generate: | ||
jobs: | ||
- changelog/changelog |