Publish to PyPI #17
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 to PyPI | |
on: | |
release: | |
types: [published] | |
jobs: | |
deploy: | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ['3.x'] | |
poetry-version: ['1.2.2'] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setting up latest Python version | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Running Poetry image | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Publishing test run | |
run: | | |
poetry build | |
poetry publish --dry-run | |
- name: Setting up git user and apply semantic versioning using Poetry | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "392781" | |
poetry version $GITHUB_REF_NAME | |
git checkout master | |
git add pyproject.toml | |
git commit -m "Release version updated to $GITHUB_REF_NAME" | |
git push origin master | |
- name: Publishing scikit-ntk to PyPI | |
run: | | |
poetry build | |
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} |