Add CLI support with python scripts #1
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 Dev Release to TestPyPI | |
on: | |
push: | |
branches: | |
- dev | |
tags: | |
- dev-v*.*.* | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.10 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
- name: Extract version from tag | |
run: echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/dev-v}" >> $GITHUB_ENV | |
- name: Build package | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Publish to TestPyPI | |
uses: pypa/gh-action-pypi-publish@v1.4.2 | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ |