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
7 changes: 6 additions & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
changelog:
exclude:
labels:
- dependencies
- deps
# GitHub's docs use the bare login, but the `[bot]` form is what shows up
# on the commits themselves. Listing both is the only way to be sure.
authors:
- renovate
- renovate[bot]
39 changes: 23 additions & 16 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,31 @@ jobs:
contents: write # Create the release and its tag

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
fetch-tags: true
persist-credentials: false

- env:
- name: Create the release
shell: python
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
set -eux
current="$(git describe --tags --abbrev=0 --match 'v*.*')"
import subprocess

major="$(echo "$current" | cut -d. -f1)"
minor="$(echo "$current" | cut -d. -f2)"
current = subprocess.run(
["gh", "release", "view", "--json", "tagName", "--jq", ".tagName"],
check=True,
text=True,
capture_output=True,
).stdout.strip()

# Major releases will be released manually.
minor=$((minor + 1))
new_tag="${major}.${minor}"
major, minor = current.split(".")[:2]

gh release create "${new_tag}" --generate-notes --notes-start-tag "${current}"
# Major releases will be released manually.
new_tag = f"{major}.{int(minor) + 1}"

subprocess.run(
[
"gh", "release", "create", new_tag,
"--generate-notes",
"--notes-start-tag", current,
],
check=True,
)
Loading