Skip to content

Commit c441a57

Browse files
committed
chore: enhance package publishing process - Added twine check command to Makefile for verifying package integrity before upload - Updated pyproject.toml to specify build system requirements and license - Modified setuptools configuration to exclude test packages from distribution - Improved GitHub Actions workflow with additional checks for package contents before and after build
1 parent 388eac9 commit c441a57

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/release-please.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,24 @@ jobs:
3333

3434
env:
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
TWINE_USERNAME: __token__
3637
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
3738

3839
steps:
3940
- uses: actions/checkout@v4
4041
with:
4142
fetch-tags: true
4243
- uses: asdf-vm/actions/install@v4
44+
- name: Check package contents before build
45+
run: |
46+
ls -la
47+
cat pyproject.toml
4348
- name: Publish package to PyPI
4449
run: make publish-package
50+
- name: Check package contents after build
51+
run: |
52+
ls -la dist/
53+
python -m twine check dist/* || true
4554
4655
publish-image:
4756
needs: release-please

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ publish: publish-package publish-image
6161
publish-package: install
6262
rm -rdf dist
6363
$(MAKE) build
64+
$(VENV) python -m twine check dist/*
6465
ifdef DRY_RUN
6566
$(VENV) python -m twine upload --repository testpypi dist/*
6667
else

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
15
[project.scripts]
26
transcribe-me = "transcribe_me.main:main"
37

@@ -7,10 +11,10 @@ version = "1.0.0"
711
authors = [{ name = "echoHello", email = "[email protected]" }]
812
description = "A CLI tool to transcribe audio files using OpenAI API"
913
readme = "README.md"
14+
license = "MIT"
1015
requires-python = ">=3.12"
1116
classifiers = [
1217
"Programming Language :: Python :: 3",
13-
"License :: OSI Approved :: MIT License",
1418
"Operating System :: OS Independent",
1519
]
1620
dependencies = [
@@ -50,7 +54,7 @@ dev = [
5054
"Bug Tracker" = "https://github.com/echohello-dev/transcribe-me/issues"
5155

5256
[tool.setuptools]
53-
packages = ["transcribe_me", "transcribe_me.config", "transcribe_me.audio"]
57+
packages = { find = { exclude = ["tests*"] } }
5458

5559
[tool.setuptools.package-data]
5660
"transcribe_me.config" = ["*.yaml"]

0 commit comments

Comments
 (0)