pypi package for both torch and pax versions

This commit is contained in:
Rajat Sen
2024-10-17 22:51:29 +00:00
parent 7b8d8c57eb
commit 280b16ee89
3 changed files with 68 additions and 59 deletions
+7 -13
View File
@@ -1,37 +1,31 @@
name: Poetry publish
on:
push:
branches: ["master"]
branches: [ "master" ]
pull_request:
branches: ["master"]
branches: [ "master" ]
jobs:
buildPush:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: '3.11'
extras: 'torch'
- python-version: '3.10'
extras: 'pax'
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: '3.10'
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
# use the hardcoded version number for now. if this is merged to the main repo, you can uncomment these lines to automatically tag the version number with the github run number
# e.g. poetry version 0.1.${{ github.run_number }}
- name: Set Version number
run: |
poetry version 1.2.1 # Or use dynamic versioning if needed
poetry version 1.2.0
- name: Build and Publish to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry build --extras ${{ matrix.extras }}
poetry publish --build