-
Notifications
You must be signed in to change notification settings - Fork 149
47 lines (44 loc) · 1.54 KB
/
Copy pathrelease-python.yml
File metadata and controls
47 lines (44 loc) · 1.54 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
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build and Release to PyPI
on:
workflow_dispatch:
inputs:
release:
description: 'tag to create and push, of the form "X.Y.Z"'
required: true
type: string
defaults:
run:
working-directory: python
jobs:
pypi-build-and-release:
name: Build and Release to PyPI
# Since we only make pure python wheels and source,
# we only need to build on one platform.
runs-on: ubuntu-latest
permissions:
# Needed for trusted publishing to PyPI
id-token: write
# Needed for pushing commit and tags
contents: write
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: tag and push tags
run: |
git config user.name "NickCrews"
git config user.email "nicholas.b.crews@gmail.com"
git tag -a "v${{ inputs.release }}" -m "Release ${{ inputs.release }}"
git push
git push origin "v${{ inputs.release }}"
- name: copy data files
run: python cp.py
- name: Build sdist and wheel
run: uv build
- name: Push build artifacts to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
packages-dir: python/dist