Skip to content

Commit

Permalink
Add release drafter workflow (#2820)
Browse files Browse the repository at this point in the history
* Release-drafter, dependabot, OCD polishing

* Commitish not needed and pointing to the wrong branch anyway, also wrong version chosen

* Pipeline is also very confusing as there are many pipelines, this is the INTEGRATION pipeline

* Adding commitish, as it is required for filter-by-commitish

* Autolabeling hits issues when using pull_request, using pull_request_target instead

* pull_request_target does nothing, trying the other suggestion from release-drafter/release-drafter#1125
  • Loading branch information
tishun authored Jun 6, 2024
1 parent cb9bc8e commit 60e00a9
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

updates:
- package-ecosystem: "maven"
directory: "/"
labels:
- "type: dependency-upgrade"
schedule:
interval: "weekly"
44 changes: 44 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name-template: '$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
filter-by-commitish: true
commitish: main

autolabeler:
- label: 'type: documentation'
files:
- '*.md'
- '.github/*'
- label: 'type: task'
files:
- '.github/*'
- label: 'type: dependency-upgrade'
files:
- 'pom.xml'

categories:
- title: '🔥 Breaking Changes'
labels:
- 'breakingchange'
- 'type: breaking'
- title: '🚀 New Features'
labels:
- 'type: enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'type: bug'
- title: '🧰 Maintenance'
labels:
- 'type: documentation'
- 'type: dependency-upgrade'
- 'type: task'

change-template: '- $TITLE (#$NUMBER)'
exclude-labels:
- 'skip-changelog'

template: |
# Changes
$CHANGES
## Contributors
We'd like to thank all the contributors who worked on this release!
$CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CodeQL analysis"
name: CodeQL analysis

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI / CD Pipeline
name: Continuous Integration
on:
push:
paths-ignore:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- '[0-9].*'
# pull_request event is required only for autolabeler
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release-drafter-config.yml
commitish: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Spellcheck Action
name: Spellcheck
on:
pull_request:
jobs:
Expand Down

0 comments on commit 60e00a9

Please sign in to comment.