Skip to content

Merge pull request #225 from ToFuProject/Issue224_Numpy #2

Merge pull request #225 from ToFuProject/Issue224_Numpy

Merge pull request #225 from ToFuProject/Issue224_Numpy #2

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
push:
tags:
- '*'
branches:
- main
release:
types: [created]
jobs:
pypi:
name: Publish sdist to Pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: '3.11'
- run: uv build --sdist
# Check that basic features work and we didn't miss to include crucial files
- name: import test (sdist)
run: uv run --isolated --no-project -p 3.11 --with dist/*.tar.gz datastock/tests/prepublish.py
- name: publish
run: uv publish -t ${{ secrets.PYPI_API_TOKEN }}