Skip to content

Commit

Permalink
ci: switch back to release drafter
Browse files Browse the repository at this point in the history
  • Loading branch information
aamirazad committed Jun 16, 2024
1 parent 128d4bd commit 8e2d3c7
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 45 deletions.
101 changes: 101 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
autolabeler:
- label: "bug"
title:
- "/fix/i"
- label: "feature"
title:
- "/feat/i"
- label: "documentation"
title:
- "/docs/i"
- label: "ci"
title:
- "/ci/i"
- label: "style"
title:
- "/style/i"
- label: "refactor"
title:
- "/refactor/i"
- label: "performance"
title:
- "/perf/i"
- label: "test"
title:
- "/test/i"
- label: "chore"
title:
- "/chore/i"
- label: "breaking"
title:
- "/BREAKING CHANGE/i"
- '/\w+!:/i'
# Adding semantic versioning labels
- label: "major"
title:
- "/BREAKING CHANGE/i"
- '/\w+!:/i'
- label: "minor"
title:
- "/feat/i"
- label: "patch"
title:
- "/fix/i"
categories:
- title: "Breaking Changes"
labels:
- "breaking-change"
- title: "Notable Changes"
labels:
- "notable"
- title: "Features"
labels:
- "enhancement"
- "feature"
- title: "Performance Improvements"
labels:
- "performance"
- title: "Bug Fixes"
labels:
- "bug"
- title: "Documentation"
labels:
- "documentation"
- title: "Style Improvements"
labels:
- "style"
- title: "Maintenance"
labels:
- "chore"
- "deployment"
- "translation"
- "ci"
- "refactor"
- title: "Dependencies"
collapse-after: 3
labels:
- "dependencies"
- title: "All App Changes"
collapse-after: 1
exclude-labels:
- "skip-changelog"
category-template: "### $TITLE"
change-template: "- $TITLE @$AUTHOR ([#$NUMBER]($URL))"
change-title-escapes: '\<*_&#@'
template: |
## v$RESOLVED_VERSION
$CHANGES
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
26 changes: 26 additions & 0 deletions .github/workflows/pr-tagger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PR Tagger

on:
pull_request:
types:
- opened
- reopened
branches:
- main

permissions:
contents: read

jobs:
pr_opened_or_reopened:
name: pr_opened_or_reopened
runs-on: ubuntu-latest
permissions:
# write permission is required for autolabeler
pull-requests: write
if: github.event_name == 'pull_request_target' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request.user.login != 'dependabot'
steps:
- name: Label PR with release-drafter
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 0 additions & 45 deletions .github/workflows/prepare-release.yml

This file was deleted.

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:
- main
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# 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: read
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8e2d3c7

Please sign in to comment.