-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (26 loc) · 801 Bytes
/
Copy pathpublish.yml
File metadata and controls
28 lines (26 loc) · 801 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
name: Publish to PyPI
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/inference-labs
permissions:
id-token: write # Trusted Publishing
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install build
- run: python -m build
- name: Publish to PyPI (Trusted Publishing)
uses: pypa/gh-action-pypi-publish@release/v1
# Configure once at https://pypi.org/manage/account/publishing/ -- map
# this workflow (publish.yml, environment pypi) to the inference-labs
# project. No API token needed after that.