diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index 02a7d7d..49fc34c 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -133,7 +133,7 @@ jobs: grep -qE "^ v${VERSION//./\\.} \(" docs/changelog.rst git diff --cached --check - id: token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 with: client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} @@ -154,4 +154,3 @@ jobs: git tag -a "$VERSION" -m "release $VERSION" gh auth setup-git --hostname github.com --force git push --atomic origin HEAD:main "refs/tags/$VERSION" - gh release create "$VERSION" --title "v$VERSION" --generate-notes --verify-tag diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 160a308..81fa1b0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,3 +59,45 @@ jobs: uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 with: attestations: true + github-release: + needs: release + runs-on: ubuntu-26.04 + permissions: + contents: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false + - name: Publish GitHub Release + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ github.ref_name }} + run: | + set -euo pipefail + awk -v tag="$TAG" ' + index($0, " v" tag " (") == 1 { found = 1; next } + found && /^ v[0-9]+\.[0-9]+\.[0-9]+ \(/ { exit } + found && $0 !~ /^\*+$/ { print } + ' docs/changelog.rst > "$RUNNER_TEMP/release-notes.md" + python3 - "$RUNNER_TEMP/release-notes.md" <<'PY' + import re + import sys + from pathlib import Path + + path = Path(sys.argv[1]) + body = path.read_text() + body = re.sub(r":user:`([^`]+)`", r"\1", body) + body = re.sub(r":(?:issue|pull):`(\d+)`", r"#\1", body) + body = re.sub(r":[a-z]+:`~?([^`]+)`", lambda match: f"`{match.group(1).split('.')[-1]}`", body) + path.write_text(body.replace("``", "`")) + PY + test -s "$RUNNER_TEMP/release-notes.md" + printf '\n[PyPI release](https://pypi.org/project/python-discovery/%s/)\n' "$TAG" >> "$RUNNER_TEMP/release-notes.md" + previous=$(git tag --list '[0-9]*' | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | awk -v tag="$TAG" '$0 == tag { print previous; exit } { previous = $0 }') + if [[ -n "$previous" ]]; then + printf '\n**Full Changelog**: https://github.com/%s/compare/%s...%s\n' "$GITHUB_REPOSITORY" "$previous" "$TAG" >> "$RUNNER_TEMP/release-notes.md" + else + printf '\n**Full Changelog**: https://github.com/%s/commits/%s\n' "$GITHUB_REPOSITORY" "$TAG" >> "$RUNNER_TEMP/release-notes.md" + fi + gh release create "$TAG" --verify-tag --title "v$TAG" --notes-file "$RUNNER_TEMP/release-notes.md" diff --git a/docs/changelog.rst b/docs/changelog.rst index 996bb7e..679783d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,6 +6,18 @@ .. towncrier release notes start +******************** + v1.6.3 (2026-10-16) +******************** + +Bug fixes - 1.6.3 +================= +- Treat specs with dot-only version components, such as ``python.``, as literal executable paths instead of raising + ``IndexError`` - by :user:`harbinresearcher`. (:issue:`147`) +- Pass PEP 514 ``ExecutableArguments`` to registered Windows interpreters when querying them, so a registration that + points at a launcher such as ``py.exe -3.11`` reports the interpreter it selects - by :user:`blouirts123`. + (:issue:`148`) + ******************** v1.6.2 (2026-10-10) ******************** @@ -61,6 +73,14 @@ Improved documentation - 1.5.3 ============================== - Document the version floors: runs on Python 3.8+, discovers interpreters down to 3.6 - by :user:`gaborbernat`. (:issue:`116`) +******************** + v1.5.2 (2026-08-12) +******************** + +Bug fixes - 1.5.2 +================= +- Move interpreter interrogation into a Python 3.6-compatible collector. (:issue:`117`) + ******************** v1.5.1 (2026-07-31) ******************** diff --git a/docs/changelog/147.bugfix.rst b/docs/changelog/147.bugfix.rst deleted file mode 100644 index 8ada1d9..0000000 --- a/docs/changelog/147.bugfix.rst +++ /dev/null @@ -1,2 +0,0 @@ -Treat specs with dot-only version components, such as ``python.``, as literal executable paths instead of raising -``IndexError`` - by :user:`harbinresearcher`. diff --git a/docs/changelog/148.bugfix.rst b/docs/changelog/148.bugfix.rst deleted file mode 100644 index 9df1cc6..0000000 --- a/docs/changelog/148.bugfix.rst +++ /dev/null @@ -1,2 +0,0 @@ -Pass PEP 514 ``ExecutableArguments`` to registered Windows interpreters when querying them, so a registration that -points at a launcher such as ``py.exe -3.11`` reports the interpreter it selects - by :user:`blouirts123`.