-
Notifications
You must be signed in to change notification settings - Fork 19
37 lines (30 loc) · 1.05 KB
/
python-publish.yml
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
name: Python publish package
on:
push:
tags:
- "v*.*.*"
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.8' # use the oldest supported Python version for publishing
- name: Build Package
run: |
pip install -r .github/requirements.txt
poetry install
poetry build
- name: Publish package distributions to Test-PyPI
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # release/v1
with:
repository-url: https://test.pypi.org/legacy/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # release/v1