Этот коммит содержится в:
Viginum-DataScientist-6 2025-07-29 13:05:56 +00:00
родитель c589aebc41
Коммит 0386589b46

23
.github/workflows/publish-to-pypi.yml поставляемый
Просмотреть файл

@ -1,11 +1,11 @@
# derived from https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow # derived from https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow
name: Publish Python 🐍 distribution 📦 to PyPI name: Publish Python distribution to PyPI
on: push on: push
jobs: jobs:
unit-test: unit-test:
name: Run unit tests 🤾 name: Run unit tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -25,9 +25,8 @@ jobs:
poetry run pytest poetry run pytest
build: build:
name: Build distribution 📦 name: Build distribution
needs: needs: unit-test
- unit-test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -53,11 +52,9 @@ jobs:
path: dist/ path: dist/
publish-to-pypi: publish-to-pypi:
name: >- name: Publish Python distribution to PyPI
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs: needs: build
- build
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: environment:
name: pypi name: pypi
@ -71,15 +68,15 @@ jobs:
with: with:
name: python-package-distributions name: python-package-distributions
path: dist/ path: dist/
- name: Publish distribution 📦 to PyPI
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 uses: pypa/gh-action-pypi-publish@release/v1
github-release: github-release:
name: >- name: >-
Sign the Python 🐍 distribution 📦 with Sigstore Sign the Python distribution with Sigstore
and upload them to GitHub Release and upload them to GitHub Release
needs: needs: publish-to-pypi
- publish-to-pypi
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions: