Skip to content

Commit 4b0d18d

Browse files
authored
Aktualisieren von python-app.yml
1 parent cf90f1c commit 4b0d18d

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

Diff for: .github/workflows/python-app.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
# This workflow will install Python dependencies, run tests and lint with a single version of Python
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
33

4+
# This workflow will upload a Python Package using Twine when a release is created
5+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
6+
7+
# This workflow uses actions that are not certified by GitHub.
8+
# They are provided by a third-party and are governed by
9+
# separate terms of service, privacy policy, and support
10+
# documentation.
11+
12+
413
name: Python application
514

15+
616
on:
17+
release:
18+
types: [published]
719
workflow_dispatch:
820

921
permissions:
@@ -13,7 +25,9 @@ jobs:
1325
build:
1426

1527
runs-on: ubuntu-latest
16-
28+
environment: release
29+
permissions:
30+
id-token: write
1731
steps:
1832
- uses: actions/checkout@v4
1933
- name: Set up Python 3.12
@@ -34,3 +48,8 @@ jobs:
3448
- name: Test with pytest
3549
run: |
3650
pytest tests/
51+
- run: pip install -U wheel build
52+
- name: Build a binary wheel and a source tarball
53+
run: python -m build
54+
- name: Publish package distributions to PyPI
55+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)