Skip to content

Commit

Permalink
Add automated CHANGELOG and release notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Omicron7 committed Nov 26, 2024
1 parent 07e0229 commit fa0d1a8
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This release drafter follows the conventions
# from https://keepachangelog.com

name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
template: '$CHANGES'
category-template: '### $TITLE'
categories:
- title: Added
labels:
- feature
- enhancement
- title: Fixed
labels:
- fix
- bug
- title: Changed
labels:
- changed
- title: Deprecated
labels:
- deprecated
- title: Removed
labels:
- removed
- title: Security
labels:
- security
- title: Documentation
labels:
- docs
- documentation
- title: Dependency Updates
labels:
- deps
- dependencies
collapse-after: 5

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- major
minor:
labels:
- minor
patch:
labels:
- patch
default: patch

exclude-labels:
- skip-changelog
50 changes: 50 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Label Checker

on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
- edited

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
check_semver_labels:
name: Check Semver labels
if: github.base_ref == 'main'
runs-on: ubuntu-latest
permissions:
pull-requests: read
checks: write
steps:
- name: Check for Semver labels
uses: danielchabr/[email protected]
with:
hasSome: major,minor,patch
githubToken: ${{ secrets.GITHUB_TOKEN }}

check_cc_labels:
name: Check conventional commits labels
if: github.base_ref == 'main'
runs-on: ubuntu-latest
permissions:
pull-requests: read
checks: write
steps:
- uses: danielchabr/[email protected]
with:
hasSome: feature,enhancement,fix,bug,changed,deprecated,removed,security,docs,documentation,deps,dependencies
githubToken: ${{ secrets.GITHUB_TOKEN }}

title-checker:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release Drafter

on:
push:
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Update Release Draft
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update Changelog

on:
release:
types:
- released

jobs:
update:
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# updated CHANGELOG back to the repository.
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}
token: ${{ secrets.CRU_DEPLOY_GITHUB_TOKEN }}

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.tag_name }}
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: ${{ github.event.release.target_commitish }}
commit_message: 'docs(changelog): update changelog'
file_pattern: CHANGELOG.md
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]


[unreleased]: https://github.com/CruGlobal/terraform-provider-semaphoreui/compare/main...HEAD

## [v1.0.0](https://github.com/CruGlobal/terraform-provider-semaphoreui/compare/v0.1.1...v1.0.0) - 2024-11-20

### Added

- Initial release of the provider
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

The [SemaphoreUI Provider](https://registry.terraform.io/providers/CruGlobal/semaphoreui/latest/docs) enables [Terraform](https://terraform.io) to manage [SemaphoreUI](https://semaphoreui.com/) resources.

This project uses Conventional Commits in order to automatically manage releases as well as keeping the CHANGELOG.md updated. CHANGELOG follows the Keep a Changelog spec.

## WARNING
This provider requires changes to SemaphoreUI API which are not yet released. It will not function until those changes have been released. https://github.com/semaphoreui/semaphore/pull/2553
Changes are currently in the `develop` branch of the SemaphoreUI project.


### SemaphoreUI API Client
Expand Down

0 comments on commit fa0d1a8

Please sign in to comment.