From 944a9fe869a07fba98cda5e8650c83769cf9a381 Mon Sep 17 00:00:00 2001 From: hhh Date: Sun, 17 Mar 2024 23:02:27 +0200 Subject: [PATCH] Update actions --- .github/workflows/python-publish.yml | 32 +++++++++++++++------------- .github/workflows/test_ci.yml | 10 ++++----- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index d4ba985..657a2bf 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,31 +1,33 @@ -# This workflows will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - name: Upload Python Package +permissions: + contents: write + id-token: write + on: release: types: [created] jobs: deploy: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.1.1 + - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5.0.0 with: - python-version: '3.7' + python-version: '3.11' + - 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 }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + pip install poetry + poetry install + + - name: Create Package + run: poetry build -f wheel + + - name: Publish + uses: pypa/gh-action-pypi-publish@v1.8.14 diff --git a/.github/workflows/test_ci.yml b/.github/workflows/test_ci.yml index cbaf759..22bda6a 100644 --- a/.github/workflows/test_ci.yml +++ b/.github/workflows/test_ci.yml @@ -20,18 +20,18 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.1.1 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5.0.0 with: python-version: '3.x' - name: Install dependencies run: | - python -m pip install --upgrade pip && pip install coverage + python -m pip install --upgrade pip && pip install coverage && pip install . - name: Test & publish code coverage - uses: paambaati/codeclimate-action@v2.6.0 + uses: paambaati/codeclimate-action@v5.0.0 env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TESTING_KEY }} + CC_TEST_REPORTER_ID: d4b381e9c8b15079fa7f08a48037b0307125e9812ea02ecf6bcc0ee1c24eae2a with: coverageCommand: sh coverage.sh debug: true