Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit 640a438

Browse files
Merge remote-tracking branch 'refs/remotes/origin/main'
2 parents 36344b0 + 4c106d9 commit 640a438

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/package.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: PyPi packaging
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
release:
9+
types: [published]
10+
workflow_dispatch: {}
11+
12+
jobs:
13+
# TODO: add testing functionality on Intel runner, by Intel team
14+
# test:
15+
# runs-on: ubuntu-latest
16+
# strategy:
17+
# matrix:
18+
# python-version: ["3.8", "3.9", "3.10", "3.11"]
19+
# steps:
20+
# - uses: actions/checkout@v4
21+
# - name: Set up Python ${{ matrix.python-version }}
22+
# uses: actions/setup-python@v5
23+
# with:
24+
# python-version: ${{ matrix.python-version }}
25+
# cache: pip
26+
# - name: Install dependencies
27+
# run: |
28+
# python -m pip install --upgrade pip
29+
# pip install pytest
30+
# pip install -e .
31+
# - name: Test with pytest
32+
# run: pytest
33+
34+
build-and-publish:
35+
needs: test
36+
runs-on: ubuntu-latest
37+
if: github.event_name == 'release' && github.event.action == 'published'
38+
environment:
39+
name: release
40+
url: https://pypi.org/p/bitsandbytes-intel
41+
permissions:
42+
id-token: write
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Set up Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: "3.10"
49+
- name: Install build dependencies
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install build wheel
53+
- name: Build package
54+
run: python -m build
55+
- name: Publish to PyPI
56+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)