From 40f7e3a829c0b1189874d3ff76187fd7b24ad097 Mon Sep 17 00:00:00 2001 From: Louis Pieterse Date: Mon, 24 Jun 2024 11:59:48 +0100 Subject: [PATCH] Switch to new PyPi publish method (#149) --- .../{pythonpublish.yml => pypipublish.yml} | 19 +++++++++++-------- setup.py | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) rename .github/workflows/{pythonpublish.yml => pypipublish.yml} (52%) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pypipublish.yml similarity index 52% rename from .github/workflows/pythonpublish.yml rename to .github/workflows/pypipublish.yml index b143a53..7a961c2 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pypipublish.yml @@ -1,4 +1,4 @@ -name: Upload Python Package +name: Publish Python Package to PYPI on: release: @@ -7,20 +7,23 @@ on: jobs: deploy: runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/cicada + permissions: + id-token: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + - name: Build package run: | python setup.py sdist bdist_wheel - twine upload dist/* + - name: Publish to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/setup.py b/setup.py index 63ce3a4..71cf893 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="cicada", - version="0.8.1", + version="0.8.2", description="Lightweight, agent-based, distributed scheduler", long_description=long_description, long_description_content_type="text/markdown",