-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (38 loc) · 1.18 KB
/
python-publish.yml
File metadata and controls
52 lines (38 loc) · 1.18 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
48
49
50
51
52
name: Upload Python Package
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# Allow one concurrent deployment
concurrency:
group: "python-publish"
cancel-in-progress: true
jobs:
python-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install dependencies
run: python -m pip install --upgrade pip
- name: Run set_up_dev_environment.py
run: python scripts/set_up_dev_environment.py
- name: Build package
run: python scripts/build.py
# - name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1