Skip to content

Commit

Permalink
separate pypi test and pypi flows
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvanBrocard committed Nov 13, 2024
1 parent 3d75c98 commit d8cbdb4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 13 deletions.
53 changes: 41 additions & 12 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on:
workflow_dispatch:
release:
types: [published]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
build:
name: Build distribution 📦
runs-on: ubuntu-22.04
permissions:
id-token: write
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
Expand All @@ -27,10 +26,40 @@ jobs:
python -m
build
--sdist
- name: Publish distribution 📦 to Test PyPI
uses: pypa/[email protected]
- name: Store the distribution package
uses: actions/upload-artifact@v4
with:
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected]
name: python-package-sdist
path: dist/

publish-to-testpypi:
name: Publish Python 🐍 distributions 📦 to TestPyPI
runs-on: ubuntu-22.04
permissions:
id-token: write
steps:
- name: Download the dist
uses: actions/download-artifact@v4
with:
name: python-package-sdist
path: dist/
- name: Publish distribution 📦 to Test PyPI
uses: pypa/[email protected]
with:
repository-url: https://test.pypi.org/legacy/


publish-to-pypi:
name: Publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags')
permissions:
id-token: write
steps:
- name: Download the dist
uses: actions/download-artifact@v4
with:
name: python-package-sdist
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/[email protected]
2 changes: 1 addition & 1 deletion src/dpu_kmeans/_core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ class Container:
def pim_cpu_time(self) -> float:
...
FEATURE_TYPE: int = 16
__version__: str = '0.2.1'
__version__: str = '0.2.2'

0 comments on commit d8cbdb4

Please sign in to comment.