Update actions

This commit is contained in:
hhh
2024-03-17 23:02:27 +02:00
parent c9414414ac
commit 944a9fe869
2 changed files with 22 additions and 20 deletions

View File

@@ -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 name: Upload Python Package
permissions:
contents: write
id-token: write
on: on:
release: release:
types: [created] types: [created]
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4.1.1
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v5.0.0
with: with:
python-version: '3.7' python-version: '3.11'
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install setuptools wheel twine pip install poetry
- name: Build and publish poetry install
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - name: Create Package
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: poetry build -f wheel
run: |
python setup.py sdist bdist_wheel - name: Publish
twine upload dist/* uses: pypa/gh-action-pypi-publish@v1.8.14

View File

@@ -20,18 +20,18 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4.1.1
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v5.0.0
with: with:
python-version: '3.x' python-version: '3.x'
- name: Install dependencies - name: Install dependencies
run: | 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 - name: Test & publish code coverage
uses: paambaati/codeclimate-action@v2.6.0 uses: paambaati/codeclimate-action@v5.0.0
env: env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TESTING_KEY }} CC_TEST_REPORTER_ID: d4b381e9c8b15079fa7f08a48037b0307125e9812ea02ecf6bcc0ee1c24eae2a
with: with:
coverageCommand: sh coverage.sh coverageCommand: sh coverage.sh
debug: true debug: true