Skip to content

Commit dbc3839

Browse files
authored
Merge pull request #56 from netgroup/add-release-drafter-action
Setup Release Drafter github action to automate the creation of release drafts
2 parents 703dd53 + 6cdbfe9 commit dbc3839

File tree

6 files changed

+115
-1
lines changed

6 files changed

+115
-1
lines changed

.github/label-pr.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
- regExp: ".*\\.ts+$"
2+
labels: ["typescript"]
3+
- regExp: ".*\\.sql+$"
4+
labels: ["database", "critical"]
5+
- regExp: "^docs/"
6+
labels: ["documentation"]
7+
- regExp: ".*\\.png+$"
8+
labels: ["images"]
9+
- regExp: "^(pom\\.xml|package\\.json|build\\.gradle)$"
10+
labels: ["dependencies"]
11+
- regExp: ".*/requirements.txt"
12+
labels: ["dependencies"]
13+
- regExp: ".*\\.(zip|jar|war|ear)+$"
14+
labels: ["artifact", "invalid"]
15+
- regExp: "^db_update/"
16+
labels: ["database utilities"]
17+
- regExp: "^control_plane/node-manager/"
18+
labels: ["node manager"]
19+
- regExp: "^control_plane/controller/"
20+
labels: ["controller"]
21+
- regExp: "^control_plane/examples/"
22+
labels: ["examples"]
23+
- regExp: "^control_plane/protos/"
24+
labels: ["protos"]
25+
- regExp: ".*/setup.py"
26+
labels: ["build"]
27+
- regExp: "^.github/"
28+
labels: ["github-workflow"]

.github/pr-labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
feature: ['feature/*', 'feat/*', 'feature-*', 'feat-*']
2+
bug: ['fix/*', 'fix-*']
3+
chore: ['chore/*', 'chore-*']

.github/release-drafter.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name-template: 'v$RESOLVED_VERSION 🌈'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
- title: '🚀 Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- title: '🐛 Bug Fixes'
9+
labels:
10+
- 'fix'
11+
- 'bugfix'
12+
- 'bug'
13+
- title: '🧰 Maintenance'
14+
label: 'chore'
15+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
16+
version-resolver:
17+
major:
18+
labels:
19+
- 'major'
20+
minor:
21+
labels:
22+
- 'minor'
23+
- 'feature'
24+
- 'enhancement'
25+
patch:
26+
labels:
27+
- 'patch'
28+
- 'fix'
29+
- 'bugfix'
30+
- 'bug'
31+
default: patch
32+
exclude-labels:
33+
- 'skip-changelog'
34+
template: |
35+
## Changes
36+
37+
$CHANGES

.github/workflows/autopep8.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
committer: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
3131
title: Fixes by autopep8 action
3232
body: This is an auto-generated PR with fixes by autopep8.
33-
labels: autopep8, automated pr
33+
labels: autopep8, automated pr, skip-changelog
3434
reviewers: cscarpitta
3535
branch: ${{ steps.vars.outputs.branch-name }}
3636
- name: Fail if autopep8 made changes

.github/workflows/pr_labeler.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Workflow to associate labels automatically
2+
name: labeler
3+
4+
# Trigger the workflow on pull request events
5+
on: [pull_request]
6+
7+
jobs:
8+
label:
9+
runs-on: ubuntu-latest
10+
steps:
11+
# We need to checkout the repository to access the configured file (.github/label-pr.yml)
12+
- uses: actions/checkout@v2
13+
- name: Labeler
14+
uses: docker://decathlon/pull-request-labeler-action:2.0.0
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
# Here we can override the path for the action configuration. If none is provided, default one is `.github/label-pr.yml`
18+
# CONFIG_PATH: ${{ secrets.GITHUB_WORKSPACE }}/.github/label-pr.yml
19+
20+
pr-labeler:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: TimonVS/pr-labeler-action@v3
24+
# with:
25+
# configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-drafter.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
jobs:
10+
update_release_draft:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Drafts your next Release notes as Pull Requests are merged into "master"
14+
- uses: release-drafter/release-drafter@v5
15+
# with:
16+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
17+
# config-name: my-config.yml
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)