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

Add repository support tools #21

Merged
merged 1 commit into from
Apr 4, 2022
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
34 changes: 34 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
labels:
- "chore"
- "dependencies"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&'
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
## Changes
$CHANGES
46 changes: 46 additions & 0 deletions .github/workflows/label-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Label Merge Checks

on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]

jobs:
do-not-merge:
if: ${{ contains(github.event.*.labels.*.name, 'do not merge') }}
name: Prevent Merging
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "Pull request is labeled as 'do not merge'"
echo "This workflow fails so that the pull request cannot be merged"
exit 1
require-semver:
if: |
!(contains(github.event.*.labels.*.name, 'patch') ||
contains(github.event.*.labels.*.name, 'minor') ||
contains(github.event.*.labels.*.name, 'major') ||
contains(github.event.*.labels.*.name, 'skip-semver'))
name: Require Semver
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "Pull request is missing semver label!"
echo "This workflow fails so that the pull request cannot be merged!"
exit 1
require-category:
if: |
!(contains(github.event.*.labels.*.name, 'feature') ||
contains(github.event.*.labels.*.name, 'fix') ||
contains(github.event.*.labels.*.name, 'chore') ||
contains(github.event.*.labels.*.name, 'docs') ||
contains(github.event.*.labels.*.name, 'dependencies'))
name: Require Category
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "Pull request is missing category label (feature/fix/chore)!"
echo "This workflow fails so that the pull request cannot be merged!"
exit 1
15 changes: 15 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Release Drafter

on:
push:
branches:
- main

jobs:
update-release-draft:
name: Update Release Draft
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}