added realese to pypi

This commit is contained in:
Schmieder, Jacob
2024-05-21 09:18:15 +00:00
parent f0c1b2dc11
commit ef1f176852
+16 -22
View File
@@ -3,7 +3,7 @@ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
on:
push:
branches:
- pyproject.toml # test branch for testing the workflow
- develop branch to create pre-release
tags:
- v* # Push tags to trigger the workflow
workflow_dispatch:
@@ -46,25 +46,19 @@ jobs:
pip install -U setuptools
pip install -r requirements.txt
python3 -m pip install --no-deps --pre --index-url https://test.pypi.org/simple/ scraibe>=0.1.3
python3 -m -c "import scraibe; print(scraibe.__version__)"
python3 -c "import scraibe; print(scraibe.__version__)"
# publish-to-pypi:
# name: Conditional Publish to PyPI or Dev Repository
# needs: [build, test-install]
# runs-on: ubuntu-latest
# environment:
# name: pypi
# url: env.PyPI_URL
# permissions:
# id-token: write
# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
# - name: Publish distribution 📦 to PyPI or Dev Repository
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: ${{ github.ref == 'refs/heads/main' && 'env.PyPI_URL' || ' env.PyPI_DEV_URL' }}
# password: ${{ secrets.PYPI_API_TOKEN}}
publish-to-pypi:
name: Publish to PyPI
needs: test-install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set up Poetry 📦
uses: JRubics/poetry-publish@v1.16
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
plugins: "poetry-dynamic-versioning"
repository_name: "scraibe"