Reworked CI

This commit is contained in:
2024-04-01 20:28:16 +02:00
parent 3fc6ae51c3
commit 51d4e7e6b8
2 changed files with 22 additions and 22 deletions

View File

@@ -39,11 +39,16 @@ jobs:
- run: python -m pip install -r requirements.txt
- run: python test.py
tag:
tag_and_publish:
runs-on: ubuntu-latest
needs: test
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- name: setup git
run: |
@@ -64,26 +69,19 @@ jobs:
- name: Push Tag
run: git push origin ${{ steps.git_version.outputs.version }}
publish:
needs: tag
runs-on: ubuntu-latest
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.build.txt
- name: Build and publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.build.txt
python setup.py sdist bdist_wheel
- name: Build and publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

View File

@@ -23,3 +23,5 @@ twine==5.0.0
urllib3==2.2.1
wheel==0.43.0
zipp==3.18.1
-r requirements.txt