Repository navigation
83 lines (83 loc) · 2.88 KB
/
Copy pathrelease-notes.yaml
File metadata and controls
83 lines (83 loc) · 2.88 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
name: Render GitHub Release notes
on:
workflow_call:
inputs:
tag:
description: Release tag to render, such as 1.2.3 or pyproject-fmt/1.2.3
required: true
type: string
changelog:
description: Tracked changelog path; empty reads the path from the committed Towncrier configuration
default: ""
type: string
artifact-url:
description: Published ecosystem release URL, one per line for several packages
default: ""
type: string
artifact-label:
description: Link text for each artifact-url line, in the same order; default PyPI release
default: ""
type: string
package:
description: Package section of a shared Markdown changelog; empty for one package
default: ""
type: string
exclude-newer:
description: Upload cutoff for the tools the shared Actions install from PyPI
default: 7 days
type: string
exclude-newer-package:
description: Newline-separated name=date cutoffs that override exclude-newer for single packages
default: ""
type: string
outputs:
artifact-id:
description: Artifact ID of the rendered GitHub Release notes
value: ${{ jobs.notes.outputs.artifact-id }}
permissions: {}
jobs:
notes:
name: 📝 Render GitHub Release notes
runs-on: ubuntu-26.04
permissions:
contents: read
outputs:
artifact-id: ${{ steps.upload.outputs.artifact-id }}
steps:
- name: 📥 Check out repository
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: 🐍 Install uv and Python
uses: astral-sh/setup-uv@v10.3.3
with:
version: latest-known
python-version: "3.15"
enable-cache: false
- id: towncrier
name: ⚙️ Read Towncrier configuration
if: inputs.changelog == ''
uses: $/read-towncrier-config
- name: 📦 Install locked release tools
uses: $/install-locked-tools
with:
groups: release-notes
venv: ${{ runner.temp }}/release-tools
exclude-newer: ${{ inputs.exclude-newer }}
exclude-newer-package: ${{ inputs.exclude-newer-package }}
- name: 📝 Render release notes
uses: $/render-release-notes
with:
tag: ${{ inputs.tag }}
changelog: ${{ inputs.changelog || steps.towncrier.outputs.changelog }}
artifact-url: ${{ inputs.artifact-url }}
artifact-label: ${{ inputs.artifact-label }}
package: ${{ inputs.package }}
- name: 📤 Upload release notes
id: upload
uses: actions/upload-artifact@v7.0.2
with:
name: github-release-notes-${{ github.run_attempt }}
path: ${{ runner.temp }}/release-notes.md
if-no-files-found: error