-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 988 Bytes
/
Copy pathrelease.yaml
File metadata and controls
36 lines (32 loc) · 988 Bytes
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
name: release
on:
release:
types: [published]
env:
X_PYTHON_MIN_VERSION: "3.11"
jobs:
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{env.X_PYTHON_MIN_VERSION }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Create source and wheel dist
# (2024-12-11, s-heppner)
# The PyPI Action expects the dist files in a toplevel `/dist` directory,
# so we have to specify this as output directory here.
run: |
python -m build --outdir dist
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1