forked from cnheider/jord
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.51 KB
/
publish-to-test-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
39
40
41
42
43
44
45
46
47
48
49
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
on: push
#on:
#push:
#branches: [master]
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11.10
- name: Install pep517
run: >-
python -m
pip install
pep517
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
pep517.build
--source
--binary
--out-dir dist/
.
- name: Publish distribution 📦 to Test PyPI
env:
test_pypi_password: ${{ secrets.test_pypi_secret }}
if: env.test_pypi_password != null && endsWith(github.ref, 'master') && github.repository_owner == 'MapsPeople'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.test_pypi_secret }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
env:
pypi_password: ${{ secrets.pypi_secret }}
if: env.pypi_password != null && startsWith(github.ref, 'refs/tags') && github.repository_owner == 'MapsPeople'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_secret }}
#verbose: true
#skip_existing: true