2021-12-31 07:46:47 +03:00
|
|
|
name: Publish library to PyPI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'auxiliary/malojalib/pyproject.toml'
|
|
|
|
# When the version updates, this file changes
|
|
|
|
# False positives only result in a failed push
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish_to_pypi:
|
|
|
|
name: Push Library to PyPI
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out the repo
|
2022-02-27 01:22:55 +03:00
|
|
|
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
2021-12-31 07:46:47 +03:00
|
|
|
|
|
|
|
- name: Set up Python
|
2022-02-27 01:22:55 +03:00
|
|
|
uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a
|
2021-12-31 07:46:47 +03:00
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pip install build
|
|
|
|
|
|
|
|
- name: Change directory
|
|
|
|
run: cd auxiliary/malojalib
|
|
|
|
|
|
|
|
- name: Build package
|
|
|
|
run: python -m build
|
|
|
|
|
|
|
|
- name: Publish to PyPI
|
2022-02-27 01:22:55 +03:00
|
|
|
uses: pypa/gh-action-pypi-publish@717ba43cfbb0387f6ce311b169a825772f54d295
|
2021-12-31 07:46:47 +03:00
|
|
|
with:
|
|
|
|
user: __token__
|
|
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|