bseltz-cohesity / scripts

Cohesity REST API examples in PowerShell and Python
Apache License 2.0
102 stars 40 forks source link

Petition for a more structured Changelogs #116

Closed samcole-p1 closed 1 year ago

samcole-p1 commented 1 year ago

Hi @bseltz-cohesity!

I've forked this repository and tested adding an automated changelog and release process to improve visibility into the changes made daily in this repo.

The problem:

The solution:

python-semantic-release - my sample action (needs a GH_TOKEN secret with a PAT or fine-grained token added in for permissions)

name: Semantic Release
on:
  push:
    branches:
      - master
jobs:
  release:
    runs-on: ubuntu-latest
    concurrency: release
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
          token: ${{ secrets.GH_TOKEN}}
      - name: Python Semantic Release
        uses: relekang/python-semantic-release@v7.34.6  
        with:
          github_token: ${{ secrets.GH_TOKEN }}
[tool.repo]
name = "scripts"
version = "0.0.0"
description = "Collection of scripts for interacting with Cohesity APIs."
authors = []

[tool.semantic_release]
version_toml = [
    "pyproject.toml:tool.repo.version"
]
major_on_zero = true
branch = "master"
upload_to_pypi = false
upload_to_release = false
build_command = false

You can view the results of the above by checking out my fork, but here is a sample of the resulting CHANGELOG file, all without having to create or manage it yourself:

# Changelog

<!--next-version-placeholder-->

## v0.1.0 (2023-07-25)

### Feature

* Add release workflow ([`008157c`](https://github.com/samcole-p1/scripts/commit/008157cd5b76a48d8217c2dd3dd1bbbb14c5408c))

### Fix

* Updated release workflow ([`8dbca77`](https://github.com/samcole-p1/scripts/commit/8dbca778d84ee08ff247a50f3467f7167260f47b))

This is available to be merged upstream, just let me know.

bseltz-cohesity commented 1 year ago

I'll take this under consideration. In the meantime I've created a new change log here: https://github.com/bseltz-cohesity/scripts/blob/master/CHANGELOG.md