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

add basic PyPI packaging workflow via trusted publishing #1

add basic PyPI packaging workflow via trusted publishing

add basic PyPI packaging workflow via trusted publishing #1

Workflow file for this run

name: PyPi packaging
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
workflow_dispatch: {}
jobs:
# TODO: add testing functionality on Intel runner, by Intel team
# test:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.8", "3.9", "3.10", "3.11"]
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# cache: pip
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install pytest
# pip install -e .
# - name: Test with pytest
# run: pytest
build-and-publish:

Check failure on line 34 in .github/workflows/package.yml

View workflow run for this annotation

GitHub Actions / PyPi packaging

Invalid workflow file

The workflow is not valid. .github/workflows/package.yml (Line: 34, Col: 3): The workflow must contain at least one job with no dependencies.
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: release
url: https://pypi.org/p/bitsandbytes-intel
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1