2022-08-03 20:57:27 +02:00
|
|
|
name: publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
paths:
|
|
|
|
- setup.py
|
|
|
|
- .github/workflows/publish.yml
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Publish App to PyPI
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up Python 3.10
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.10'
|
|
|
|
|
|
|
|
- name: Install Python Dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2022-08-03 21:01:18 +02:00
|
|
|
pip install build twine
|
2022-08-03 20:57:27 +02:00
|
|
|
pip install --upgrade .
|
|
|
|
|
|
|
|
- name: Build Application
|
|
|
|
run: |
|
|
|
|
rm -rf dist
|
|
|
|
python -m build
|
|
|
|
|
|
|
|
- name: Publish App to Test PyPI
|
|
|
|
env:
|
|
|
|
TWINE_USERNAME: __token__
|
|
|
|
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_KEY }}
|
|
|
|
run: |
|
|
|
|
twine check dist/*
|
|
|
|
twine upload -r testpypi dist/*
|