Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ jobs:
- uses: astral-sh/setup-uv@v5
with:
python-version: '3.11'
- run: uv build
- run: uv build --sdist
# Check that basic features work and we didn't miss to include crucial files
- name: import test (wheel)
run: uv run --isolated --no-project -p 3.11 --with dist/*.whl datastock/tests/prepublish.py
- name: import test (source distribution)
- name: import test (sdist)
run: uv run --isolated --no-project -p 3.11 --with dist/*.tar.gz datastock/tests/prepublish.py
- run: uv publish -t ${{ secrets.PYPI_API_TOKEN }}
- name: publish
run: uv publish -t ${{ secrets.PYPI_API_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/python-publish-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 wheels

on:
push:
tags:
- '*'
branches:
- main
release:
types: [created]

jobs:
pypi:
name: Publish wheel to Pypi
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- run: uv build --wheel
# Check that basic features work and we didn't miss to include crucial files
- name: import test (wheel)
run: uv run --isolated --no-project -p ${{ matrix.python-version }} --with dist/*.whl datastock/tests/prepublish.py
- name: publish
run: uv publish -t ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ keywords = [
]
requires-python = ">=3.8"
dependencies = [
"numpy",
"numpy<1.25", # for astropy compatibility vs deprecated np.product
"scipy",
"matplotlib",
# "PySide2 ; platform_system != 'Windows'",
Expand Down
Loading