-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 1.19 KB
/
publish-pypi.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
38
name: Publish tagged version to PyPI
on:
push:
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/fitk
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
#----------------------------------------------
# poetry setup
#----------------------------------------------
- uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: Build wheel and tarball
run: poetry build --no-interaction
- name: Publish package distributions to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/