From 3e74b77e3eaf967f5018925096084532fd3f2c51 Mon Sep 17 00:00:00 2001 From: Ronak Shah Date: Mon, 17 Jun 2024 04:34:09 -0400 Subject: [PATCH] Updating workflows --- .github/workflows/publish_conda.yml | 2 +- .github/workflows/python-publish.yml | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish_conda.yml b/.github/workflows/publish_conda.yml index 7697166..5d67afd 100644 --- a/.github/workflows/publish_conda.yml +++ b/.github/workflows/publish_conda.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: publish-to-conda - uses: maxibor/conda-package-publish-action@1.1 + uses: maxibor/conda-package-publish-action@master with: subdir: 'conda' anacondatoken: ${{ secrets.ANACONDA_TOKEN }} diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 51d8ad2..69c91d2 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -18,14 +18,21 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.x' + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python - + poetry lock + - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish + poetry install + + - name: Build package + run: poetry build + + - name: Publish package env: - TWINE_USERNAME: '__token__' - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYPI_API_TOKEN: ${{ secrets.PYPI_PASSWORD }} run: | - python setup.py sdist bdist_wheel - twine upload dist/* + poetry config pypi-token.pypi ${PYPI_API_TOKEN} + poetry publish