Skip to content

fix: Aktualisiere README.md mit PyPI Versionsbadge und entferne veral… #2

fix: Aktualisiere README.md mit PyPI Versionsbadge und entferne veral…

fix: Aktualisiere README.md mit PyPI Versionsbadge und entferne veral… #2

name: Auto release & publish (https-login)
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
outputs:
released: ${{ steps.sr.outputs.released }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "pip"
- name: Install tooling
run: |
python -m pip install --upgrade pip
python -m pip install python-semantic-release build
- name: Semantic Release (version + tag + GitHub release)
id: sr
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
semantic-release version
semantic-release publish
- name: Build distributions
if: steps.sr.outputs.released == 'true'
run: |
python -m pip install --upgrade build
python -m build
- name: Upload dist artifact (for debugging)
if: steps.sr.outputs.released == 'true'
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
pypi:
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.released == 'true'
permissions:
id-token: write # required for OIDC trusted publishing
contents: read
environment:
name: pypi
url: https://pypi.org/project/https-login/
steps:
- name: Download dist artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish to PyPI (Trusted Publishing)
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/