Skip to content

Commit cf47779

Browse files
committed
update package-pypi.yml
1 parent 79b8a00 commit cf47779

File tree

2 files changed

+38
-29
lines changed

2 files changed

+38
-29
lines changed

.github/workflows/package-pypi.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Package-PyPI
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
permissions: write-all
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
14+
os: [ubuntu-latest, macOS-latest, windows-latest]
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install Python dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements.txt
27+
- name: Build crate
28+
run: cargo build --verbose
29+
- name: Test crate
30+
run: cargo test --verbose
31+
- name: Maturin build and publish
32+
run:
33+
maturin publish --no-sdist -u __token__ -i python
34+
env:
35+
MATURIN_PASSWORD: ${{ secrets.PYPI_TOKEN }}
36+
37+
# notes:
38+
# - for test-pypi: maturin publish --no-sdist -u __token__ -i python -r https://test.pypi.org/legacy/

.github/workflows/package.yml

-29
This file was deleted.

0 commit comments

Comments
 (0)