Merge pull request #852 from AFM-SPM/ns-rse/851-afmreader #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish package to PyPi | |
# See https://docs.pypi.org/trusted-publishers/adding-a-publisher/ | |
on: | |
push: | |
tags: | |
- v* | |
workflow_dispatch: # Uncomment line if you also want to trigger action manually | |
jobs: | |
build-release: | |
runs-on: ubuntu-latest | |
environment: pypi-publish | |
name: Publish package to PyPi | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Installing the package | |
run: | | |
pip3 install . | |
pip3 install .[pypi] | |
- name: Build package | |
run: | | |
pip3 install --upgrade setuptools | |
export DEB_PYTHON_INSTALL_LAYOUT=deb_system | |
python -m build --no-isolation | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |