Skip to content

Commit e9e94ec

Browse files
Bobainclaude
andcommitted
Add PyPI package configuration and GitHub Actions publish workflow
- Add full PyPI metadata (author, license, classifiers, urls) - Add GitHub Actions workflow to publish to PyPI on release - Add MIT LICENSE file To publish: 1. Create a PyPI account and set up trusted publishing for this repo 2. Create a GitHub release 3. The workflow will automatically build and publish to PyPI Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b3fbf13 commit e9e94ec

3 files changed

Lines changed: 87 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.12"
17+
18+
- name: Install build dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install build
22+
23+
- name: Build package
24+
run: python -m build
25+
26+
- name: Upload artifacts
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: dist
30+
path: dist/
31+
32+
publish:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
environment: pypi
36+
permissions:
37+
id-token: write
38+
steps:
39+
- name: Download artifacts
40+
uses: actions/download-artifact@v4
41+
with:
42+
name: dist
43+
path: dist/
44+
45+
- name: Publish to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Bobain
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,31 @@ version = "0.1.0"
44
description = "A Python chess GUI application using pygame and python-chess with Stockfish support"
55
readme = "README.md"
66
requires-python = ">=3.12"
7+
license = {text = "MIT"}
8+
authors = [
9+
{name = "Bobain", email = "bobain@users.noreply.github.com"}
10+
]
11+
keywords = ["chess", "gui", "pygame", "stockfish", "game"]
12+
classifiers = [
13+
"Development Status :: 4 - Beta",
14+
"Intended Audience :: End Users/Desktop",
15+
"License :: OSI Approved :: MIT License",
16+
"Operating System :: MacOS",
17+
"Operating System :: POSIX :: Linux",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3.12",
20+
"Topic :: Games/Entertainment :: Board Games",
21+
]
722
dependencies = [
823
"chess>=1.11.2",
924
"pygame>=2.6.1",
1025
]
1126

27+
[project.urls]
28+
Homepage = "https://github.com/Bobain/python-chess-gui"
29+
Repository = "https://github.com/Bobain/python-chess-gui"
30+
Issues = "https://github.com/Bobain/python-chess-gui/issues"
31+
1232
[project.scripts]
1333
chess-gui = "python_chess_gui.main:main"
1434

0 commit comments

Comments
 (0)