swadhinbiswas 🚀 release: 2.0.8 — write-path fix (ADR-080), fork-safe GIL pool (ADR-081), HTTP/3 (ADR-082), Security DI fix, docs honesty pass · 8/6/2026
731fffe
99 lines · 2.5 KB
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
95
96
97
98
99
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
    # PyPI upload is owned by wheels.yml (7-platform matrix on tag push).
    # This job only builds + verifies; the release assets come from wheels.yml.
    if: false
    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
    # PyPI upload is owned by wheels.yml (7-platform matrix). This job only
    # builds + verifies the wheel, then creates the GitHub Release with it.
    needs: [build]
    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