swadhinbiswas 🔧 CI/CD: Add comprehensive pipeline with integration tests and PyPI publish · 7/28/2026
75657e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Publish to PyPI
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 2.0.8)'
required: true
jobs:
build:
name: Build Wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Python (for PyO3)
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-publish-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-publish-
- name: Install maturin
run: pip install maturin
- name: Build wheel
run: maturin build --release -m crates/justapi-py/Cargo.toml -o wheels/
- name: Verify wheel
run: |
pip install wheels/*.whl --break-system-packages
python -c "import justapi; print(f'JustAPI installed successfully')"
- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: wheels
path: wheels/*.whl
publish-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build]
environment: pypi
permissions:
id-token: write
steps:
- name: Download wheel artifact
uses: actions/download-artifact@v4
with:
name: wheels
path: wheels/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheels/
create-github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [publish-pypi]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download wheel artifact
uses: actions/download-artifact@v4
with:
name: wheels
path: wheels/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: wheels/*.whl
generate_release_notes: true