forked from AcademySoftwareFoundation/rez
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.05 KB
/
pypi.yaml
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
name: pypi
on:
release:
types: [released]
permissions:
contents: read
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# Not sure if it's needed here since it's defined at the top level.
contents: read
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 3.11
- name: Install Dependencies
run: |
pip install build
- name: Build rez
run: |
python -m build --sdist --wheel --outdir dist .
# Note that we don't need credentials.
# We rely on https://docs.pypi.org/trusted-publishers/.
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
with:
packages-dir: dist