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
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