-
Notifications
You must be signed in to change notification settings - Fork 20
30 lines (28 loc) · 897 Bytes
/
release-pypi.yaml
File metadata and controls
30 lines (28 loc) · 897 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
# https://github.com/rexzhang/python-project-template/edit/main/.github/workflows/release-github.yaml
name: Publish package to PyPI
on:
push:
tags:
- "v*"
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: ${{ vars.PYPI_PROJECT_URL }}
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout repository
# https://github.com/actions/checkout
uses: actions/checkout@v5
- name: Install dependencies
run: |
python3 -m pip install -U -r requirements.d/pypi.txt
- name: Build wheels
run: |
python -m build
- name: Publish package distributions to PyPI
# https://github.com/pypa/gh-action-pypi-publish
uses: pypa/gh-action-pypi-publish@release/v1