-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.07 KB
/
python-publish-sdist.yml
File metadata and controls
34 lines (30 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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 }}