Added version 2.6.1 #54
Workflow file for this run
This file contains hidden or 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 to PyPI | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
paths: | |
- 'src/**' | |
- 'setup.py' | |
- 'setup.cfg' | |
- 'requirements.txt' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- config-file: "setup.cfg" | |
pypi-token: "PYPI_API_TOKEN_DEFAULT" | |
- config-file: "setup_browser.cfg" | |
pypi-token: "PYPI_API_TOKEN_BROWSER" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 10 | |
- name: Get the most recent tag | |
run: | | |
git fetch --depth=10 --tags | |
TAG=$(git describe --tags `git rev-list --tags --max-count=1`) | |
echo "Most recent tag is $TAG" | |
echo "SHIMOKU_VERSION=$TAG" >> $GITHUB_ENV | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools setuptools_scm wheel twine build | |
- name: Replace setup.cfg with the desired configuration | |
run: | | |
if [ "${{ matrix.config-file }}" != "setup.cfg" ]; then | |
cp ${{ matrix.config-file }} setup.cfg | |
fi | |
- name: Build the package | |
run: python -m build | |
- name: Publish package to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets[matrix.pypi-token] }} | |
run: | | |
twine upload dist/* |