Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable 'Release drafter' & 'Update changelog' workflows #30

Merged
merged 4 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[{*.json,*.yml}]
indent_style = space
indent_size = 2
75 changes: 49 additions & 26 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Release Drafter also supports Probot Config,
# if you want to store your configuration files in a central repository.
# This allows you to share configurations between projects,
# and create a organization-wide configuration file
# Release Drafter also supports Probot Config,
# if you want to store your configuration files in a central repository.
# This allows you to share configurations between projects,
# and create a organization-wide configuration file
# by creating a repository named .github with the file .github/release-drafter.yml.
#
#
# https://github.com/release-drafter/release-drafter

name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
name-template: '$RESOLVED_VERSION 🌈'
tag-template: '$RESOLVED_VERSION'

# https://github.com/release-drafter/release-drafter#autolabeler
autolabeler:
Expand All @@ -24,33 +24,56 @@ exclude-contributors:

# https://github.com/release-drafter/release-drafter#categorize-pull-requests
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
- title: 🚀 Added
labels:
- 'feature'
- 'enhancement'
- 'changelog:added'
- title: Deprecated
labels:
- 'changelog:deprecated '
- title: Removed
labels:
- 'changelog:removed'
- title: 🐛 Fixed
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'changelog:fixed'
- title: Security
labels:
- 'security'
- 'changelog:security'
- title: 'Dependency Updates & Maintenance'
labels:
- 'dependencies'
- 'maintenance'

change-template: '- $TITLE ([#$NUMBER]($URL))'
# change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

# https://github.com/release-drafter/release-drafter#version-resolver
version-resolver:
major:
labels:
- 'major'
- 'changelog:removed'
minor:
labels:
- 'minor'
- 'feature'
- 'enhancement'
- 'changelog:added'
- 'changelog:deprecated '
patch:
labels:
- 'patch'
- 'fix'
- 'bugfix'
- 'bug'
- 'changelog:fixed'
- 'security'
- 'changelog:security'
- 'dependencies'
- 'maintenance'
default: patch
template: |
## Changes

$CHANGES
$CHANGES
49 changes: 49 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Update Changelog'

on:
release:
types: [released]

jobs:
update:
runs-on: ubuntu-latest

steps:
- name: Checkout code
# Push to protected branches
# If your repository uses protected branches you have to make some changes
# to your Workflow for the Action to work properly:
#
# You need a Personal Access Token and you either have to
# a) allow force pushes
# or
# b) the Personal Access Token needs to belong to an Administrator.
#
# Add the following to the 'with:' group: 'token: ${{ secrets.PAT }}'
#
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_TOKEN }}
ref: ${{ github.event.release.target_commitish }}

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

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.event.release.target_commitish }}
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md

# Optional commit user and author settings
# defaults to "github-actions[bot]"
commit_user_name: figuren-theater-bot
# defaults to "41898282+github-actions[bot]@users.noreply.github.com"
commit_user_email: email-roboter@figuren.theater
# defaults to author of the commit that triggered the run
commit_author: Frieda Theodor Automatisierungs-Bot <email-roboter@figuren.theater>

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

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

## [Unreleased](https://github.com/figuren-theater/.github/compare/1.0.0...HEAD)

## 1.0.0 - 2023-06-27

No documentation until now.