Skip to content

Commit c9e109d

Browse files
committed
feat: add PyPI publish workflow
- Add publish.yml for automated PyPI releases - Update package name to x12-python - Update all GitHub URLs to copyleftdev/x12-python - Secret PYPI_API_TOKEN configured in repo
1 parent 2a18861 commit c9e109d

File tree

3 files changed

+61
-8
lines changed

3 files changed

+61
-8
lines changed

.github/workflows/publish.yml

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

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ flowchart TB
7878
## Installation
7979

8080
```bash
81-
pip install x12-edi-tools
81+
pip install x12-python
8282
```
8383

8484
Or install from source:
8585

8686
```bash
87-
git clone https://github.com/donjohnson/x12-edi-tools.git
88-
cd x12-edi-tools
87+
git clone https://github.com/copyleftdev/x12-python.git
88+
cd x12-python
8989
pip install -e .
9090
```
9191

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[project]
6-
name = "x12"
6+
name = "x12-python"
77
version = "0.1.0"
88
description = "The ultimate Python toolkit for X12 EDI processing"
99
readme = "README.md"
@@ -62,10 +62,10 @@ dev = [
6262
]
6363

6464
[project.urls]
65-
Homepage = "https://github.com/donjohnson/x12-edi-tools"
66-
Documentation = "https://github.com/donjohnson/x12-edi-tools#readme"
67-
Repository = "https://github.com/donjohnson/x12-edi-tools"
68-
Issues = "https://github.com/donjohnson/x12-edi-tools/issues"
65+
Homepage = "https://github.com/copyleftdev/x12-python"
66+
Documentation = "https://github.com/copyleftdev/x12-python#readme"
67+
Repository = "https://github.com/copyleftdev/x12-python"
68+
Issues = "https://github.com/copyleftdev/x12-python/issues"
6969

7070
[tool.hatch.build.targets.wheel]
7171
packages = ["x12"]

0 commit comments

Comments
 (0)