Skip to content

Commit dbc39f0

Browse files
committed
Add PyPI release workflow and bump version to 1.21.3
- New GitHub Actions workflow builds sdist/wheel on semver tags and publishes via PyPI trusted publishing (pypi environment). - CHANGELOG and version for 1.21.3 (Java annotation arguments fix, #463). Made-with: Cursor
1 parent 79e4486 commit dbc39f0

3 files changed

Lines changed: 63 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Publish to PyPI when a version tag is pushed (e.g. 1.21.3).
2+
#
3+
# One-time PyPI setup (trusted publishing, recommended):
4+
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/
5+
# - PyPI → lizard → Manage → Publishing → Add a new pending publisher
6+
# - Owner/repo: this repository, Workflow: release.yml, Environment: pypi
7+
# Create a GitHub "pypi" environment (Settings → Environments) if you use the
8+
# environment name below; optional approval rules are supported there.
9+
#
10+
# Fallback: store PYPI_API_TOKEN in repo secrets and add to the publish job:
11+
# with:
12+
# password: ${{ secrets.PYPI_API_TOKEN }}
13+
14+
name: Release — publish to PyPI
15+
16+
on:
17+
push:
18+
tags:
19+
- '[0-9]*.[0-9]*.[0-9]*'
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.11'
30+
31+
- name: Install build tooling
32+
run: pip install --upgrade pip build
33+
34+
- name: Build sdist and wheel
35+
run: python -m build
36+
37+
- uses: actions/upload-artifact@v4
38+
with:
39+
name: python-package-distributions
40+
path: dist/
41+
42+
publish:
43+
needs: build
44+
runs-on: ubuntu-latest
45+
environment:
46+
name: pypi
47+
url: https://pypi.org/p/lizard/
48+
permissions:
49+
id-token: write
50+
steps:
51+
- uses: actions/download-artifact@v4
52+
with:
53+
name: python-package-distributions
54+
path: dist/
55+
56+
- name: Publish to PyPI
57+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Unreleased
44

5+
## 1.21.3
6+
7+
### Bug Fixes
8+
- Fix Java annotations with parenthesized arguments (e.g. `@Transactional(rollbackFor = Exception.class)`) being parsed as methods and corrupting complexity (issue #463)
9+
510
## 1.21.2
611

712
### Bug Fixes

lizard_ext/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#
44
# pylint: disable=missing-docstring,invalid-name
55

6-
version = "1.21.2"
6+
version = "1.21.3"

0 commit comments

Comments
 (0)