Skip to content

Commit

Permalink
feat: changelog file added and release of new version included to git…
Browse files Browse the repository at this point in the history
…hub CI
  • Loading branch information
yoctoyotta1024 committed May 2, 2024
1 parent 2990d63 commit 6fdc113
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
37 changes: 36 additions & 1 deletion .github/workflows/cocogitto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,44 @@ jobs:
with:
fetch-depth: 0

- name: Conventional commits compliance
- name: Conventional commits compliance check
uses: oknozor/cocogitto-action@v3
with:
check-latest-tag-only: true
git-user: 'yoctoyotta1024'
git-user-email: 'yoctoyotta1024@yahoo.com'

release:
needs: cog_check_job
# Only release new version when merging into `origin/main`.`
if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'yoctoyotta1024'"
permissions:
contents: write
runs-on: ubuntu-latest
name: Perform semantic versioning release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: semver release with cocogitto
uses: oknozor/cocogitto-action@v3
id: release
with:
release: true
check-latest-tag-only: true
git-user: 'yoctoyotta1024'
git-user-email: 'yoctoyotta1024@yahoo.com'

# The version number is accessible as a github action output
- name: Print version
run: "echo '${{ steps.release.outputs.version }}'"

- name: Generate Changelog
run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > GITHUB_CHANGELOG.md

- name: Upload github release
uses: softprops/action-gh-release@v1
with:
body_path: GITHUB_CHANGELOG.md
tag_name: ${{ steps.release.outputs.version }}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
- - -
14 changes: 11 additions & 3 deletions cog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@ branch_whitelist = []
skip_ci = "[skip ci]"
skip_untracked = false
tag_prefix = "v"
pre_bump_hooks = []
post_bump_hooks = []
pre_package_bump_hooks = []
post_package_bump_hooks = []

pre_bump_hooks = [
"echo {{version}}",
]

post_bump_hooks = []

[git_hooks]

[commit_types]

[changelog]
path = "CHANGELOG.md"
authors = []
template = "remote"
remote = "github.com"
repository = "CLEO"
owner = "yoctoyotta1024"
authors = [{ username = "yoctoyotta1024", signature = "Clara Bayley" }]

[bump_profiles]

Expand Down

0 comments on commit 6fdc113

Please sign in to comment.