-
Notifications
You must be signed in to change notification settings - Fork 31
101 lines (88 loc) · 3.04 KB
/
release-notes.yml
File metadata and controls
101 lines (88 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Generate Release Notes
on:
workflow_call:
inputs:
plugin_name:
required: true
type: string
description: "Name of the plugin"
package_version:
required: true
type: string
description: "Version number for the release"
build_suffix:
required: true
type: string
description: "Build suffix based on framework and branch"
minimum_lidarr_version:
required: true
type: string
description: "Minimum required Lidarr version"
commit_messages:
required: true
type: string
description: "Commit messages since last release"
git_commit:
required: true
type: string
description: "Git commit SHA used for the build"
branch_repo_url:
required: true
type: string
description: "Repository URL with branch path"
git_branch:
required: true
type: string
description: "Current git branch"
plugin_input_format:
required: true
type: string
description: "Plugin input format: name@owner#branch"
outputs:
release_notes_id:
description: "ID of the generated release notes"
value: ${{ jobs.generate.outputs.release_notes_id }}
jobs:
generate:
runs-on: ubuntu-latest
outputs:
release_notes_id: ${{ steps.create_notes.outputs.release_notes_id }}
steps:
- name: Generate Release Notes
id: create_notes
run: |
# Generate a unique ID for this release notes
NOTES_ID="release-notes-${{ github.run_id }}"
echo "release_notes_id=$NOTES_ID" >> $GITHUB_OUTPUT
# Print the commit messages for debugging
echo "Commit messages:"
echo "${{ inputs.commit_messages }}"
# Use the git_branch input directly
BRANCH_NAME="${{ inputs.git_branch }}"
echo "Using branch from git-info: $BRANCH_NAME"
# Set default branch
DEFAULT_BRANCH="master"
# Generate release notes in markdown
cat > release_notes.md << EOL
## 📝 What's New:
${{ inputs.commit_messages }}
---
## 📥 Installation Notes:
- In Lidarr, navigate to **System -> Plugins**
- Enter: \`${{ inputs.plugin_input_format }}\`
---
## 📦 Package Information
**Version:** ${{ inputs.package_version }}
**.NET Version:** ${{ inputs.build_suffix }}
**Minimum Lidarr Version:** ${{ inputs.minimum_lidarr_version }}
**Commit:** ${{ inputs.git_commit }}
EOL
# Debug: Show what was generated
echo "Generated release notes:"
cat release_notes.md
- name: Upload Release Notes
uses: actions/upload-artifact@v4
with:
name: ${{ steps.create_notes.outputs.release_notes_id }}
path: release_notes.md
retention-days: 1