Skip to content

Commit fa0d1a8

Browse files
committed
Add automated CHANGELOG and release notes.
1 parent 07e0229 commit fa0d1a8

File tree

6 files changed

+181
-0
lines changed

6 files changed

+181
-0
lines changed

.github/release-drafter.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This release drafter follows the conventions
2+
# from https://keepachangelog.com
3+
4+
name-template: 'v$RESOLVED_VERSION'
5+
tag-template: 'v$RESOLVED_VERSION'
6+
template: '$CHANGES'
7+
category-template: '### $TITLE'
8+
categories:
9+
- title: Added
10+
labels:
11+
- feature
12+
- enhancement
13+
- title: Fixed
14+
labels:
15+
- fix
16+
- bug
17+
- title: Changed
18+
labels:
19+
- changed
20+
- title: Deprecated
21+
labels:
22+
- deprecated
23+
- title: Removed
24+
labels:
25+
- removed
26+
- title: Security
27+
labels:
28+
- security
29+
- title: Documentation
30+
labels:
31+
- docs
32+
- documentation
33+
- title: Dependency Updates
34+
labels:
35+
- deps
36+
- dependencies
37+
collapse-after: 5
38+
39+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
40+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
41+
version-resolver:
42+
major:
43+
labels:
44+
- major
45+
minor:
46+
labels:
47+
- minor
48+
patch:
49+
labels:
50+
- patch
51+
default: patch
52+
53+
exclude-labels:
54+
- skip-changelog

.github/workflows/check-pr.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Label Checker
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- labeled
10+
- unlabeled
11+
- edited
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
check_semver_labels:
19+
name: Check Semver labels
20+
if: github.base_ref == 'main'
21+
runs-on: ubuntu-latest
22+
permissions:
23+
pull-requests: read
24+
checks: write
25+
steps:
26+
- name: Check for Semver labels
27+
uses: danielchabr/[email protected]
28+
with:
29+
hasSome: major,minor,patch
30+
githubToken: ${{ secrets.GITHUB_TOKEN }}
31+
32+
check_cc_labels:
33+
name: Check conventional commits labels
34+
if: github.base_ref == 'main'
35+
runs-on: ubuntu-latest
36+
permissions:
37+
pull-requests: read
38+
checks: write
39+
steps:
40+
- uses: danielchabr/[email protected]
41+
with:
42+
hasSome: feature,enhancement,fix,bug,changed,deprecated,removed,security,docs,documentation,deps,dependencies
43+
githubToken: ${{ secrets.GITHUB_TOKEN }}
44+
45+
title-checker:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: amannn/[email protected]
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
update_release_draft:
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Update Release Draft
19+
uses: release-drafter/release-drafter@v5
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Update Changelog
2+
3+
on:
4+
release:
5+
types:
6+
- released
7+
8+
jobs:
9+
update:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
# Give the default GITHUB_TOKEN write permission to commit and push the
14+
# updated CHANGELOG back to the repository.
15+
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
16+
contents: write
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
with:
22+
ref: ${{ github.event.release.target_commitish }}
23+
token: ${{ secrets.CRU_DEPLOY_GITHUB_TOKEN }}
24+
25+
- name: Update Changelog
26+
uses: stefanzweifel/changelog-updater-action@v1
27+
with:
28+
latest-version: ${{ github.event.release.tag_name }}
29+
release-notes: ${{ github.event.release.body }}
30+
31+
- name: Commit updated CHANGELOG
32+
uses: stefanzweifel/git-auto-commit-action@v5
33+
with:
34+
branch: ${{ github.event.release.target_commitish }}
35+
commit_message: 'docs(changelog): update changelog'
36+
file_pattern: CHANGELOG.md

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
11+
[unreleased]: https://github.com/CruGlobal/terraform-provider-semaphoreui/compare/main...HEAD
12+
13+
## [v1.0.0](https://github.com/CruGlobal/terraform-provider-semaphoreui/compare/v0.1.1...v1.0.0) - 2024-11-20
14+
15+
### Added
16+
17+
- Initial release of the provider

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

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

5+
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.
6+
57
## WARNING
68
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
9+
Changes are currently in the `develop` branch of the SemaphoreUI project.
710

811

912
### SemaphoreUI API Client

0 commit comments

Comments
 (0)