Skip to content

Commit b4bd84b

Browse files
committed
automated release tests
1 parent a631cbd commit b4bd84b

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

.github/release-drafter.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
4+
categories:
5+
- title: "Features"
6+
labels:
7+
- "feature"
8+
- "enhancement"
9+
- title: "Fixes"
10+
labels:
11+
- "fix"
12+
- "bugfix"
13+
- "bug"
14+
- title: "Photon Version Updates"
15+
labels:
16+
- "update"
17+
- "automated-pr"
18+
- title: "Maintenance"
19+
labels:
20+
- "chore"
21+
- "maintenance"
22+
- "dependencies"
23+
24+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
25+
change-title-escapes: '\<*_&'
26+
27+
version-resolver:
28+
major:
29+
labels:
30+
- "major"
31+
- "breaking-change"
32+
minor:
33+
labels:
34+
- "minor"
35+
- "feature"
36+
- "enhancement"
37+
patch:
38+
labels:
39+
- "patch"
40+
- "fix"
41+
- "bugfix"
42+
- "bug"
43+
- "update"
44+
- "automated-pr"
45+
- "maintenance"
46+
- "chore"
47+
- "dependencies"
48+
default: patch
49+
50+
template: |
51+
## What's Changed
52+
53+
$CHANGES
54+
55+
**Full Changelog**: $PREVIOUS_TAG...v$RESOLVED_VERSION
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: read
12+
13+
jobs:
14+
update-release-draft:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Repository
18+
uses: actions/checkout@v6
19+
20+
- name: Run Release Drafter
21+
id: release-drafter
22+
uses: release-drafter/release-drafter@v6
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Add upstream Photon release notes link
27+
if: steps.release-drafter.outputs.id != ''
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
DRAFT_BODY: ${{ steps.release-drafter.outputs.body }}
31+
run: |
32+
PHOTON_VERSION=$(tr -d '[:space:]' < .last_release)
33+
{
34+
printf '%s' "$DRAFT_BODY"
35+
printf '\n\n---\n **Upstream Photon release notes (%s):** https://github.com/komoot/photon/releases/tag/%s\n' \
36+
"$PHOTON_VERSION" "$PHOTON_VERSION"
37+
} > /tmp/new_body.txt
38+
gh api "repos/${{ github.repository }}/releases/${{ steps.release-drafter.outputs.id }}" \
39+
--method PATCH \
40+
--field body=@/tmp/new_body.txt

0 commit comments

Comments
 (0)