Skip to content
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
55 changes: 55 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"

categories:
- title: "Features"
labels:
- "feature"
- "enhancement"
- title: "Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "Photon Version Updates"
labels:
- "update"
- "automated-pr"
- title: "Maintenance"
labels:
- "chore"
- "maintenance"
- "dependencies"

change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&'

version-resolver:
major:
labels:
- "major"
- "breaking-change"
minor:
labels:
- "minor"
- "feature"
- "enhancement"
patch:
labels:
- "patch"
- "fix"
- "bugfix"
- "bug"
- "update"
- "automated-pr"
- "maintenance"
- "chore"
- "dependencies"
default: patch

template: |
## What's Changed

$CHANGES

**Full Changelog**: $PREVIOUS_TAG...v$RESOLVED_VERSION
40 changes: 40 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Drafter

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write
pull-requests: read

jobs:
update-release-draft:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6

- name: Run Release Drafter
id: release-drafter
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Add upstream Photon release notes link
if: steps.release-drafter.outputs.id != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_BODY: ${{ steps.release-drafter.outputs.body }}
run: |
PHOTON_VERSION=$(tr -d '[:space:]' < .last_release)
{
printf '%s' "$DRAFT_BODY"
printf '\n\n---\n **Upstream Photon release notes (%s):** https://github.com/komoot/photon/releases/tag/%s\n' \
"$PHOTON_VERSION" "$PHOTON_VERSION"
} > /tmp/new_body.txt
gh api "repos/${{ github.repository }}/releases/${{ steps.release-drafter.outputs.id }}" \
--method PATCH \
--field body=@/tmp/new_body.txt