You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/python-publish.yml
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
-
# This workflow will upload a Python Package to PyPI when a release is created
2
-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
-
4
-
# This workflow uses actions that are not certified by GitHub.
5
-
# They are provided by a third-party and are governed by
6
-
# separate terms of service, privacy policy, and support
7
-
# documentation.
8
-
9
-
name: Upload Python Package
1
+
name: Publish Python Package
10
2
11
3
on:
12
4
release:
13
5
types: [published]
6
+
workflow_dispatch:
7
+
push:
8
+
tags:
9
+
- "v*"
14
10
15
11
permissions:
16
12
contents: read
17
13
14
+
concurrency:
15
+
group: pypi-publish-${{ github.ref }}
16
+
cancel-in-progress: false
17
+
18
18
jobs:
19
19
release-build:
20
20
runs-on: ubuntu-latest
@@ -24,14 +24,19 @@ jobs:
24
24
25
25
- uses: actions/setup-python@v5
26
26
with:
27
-
python-version: "3.x"
27
+
python-version: "3.11"
28
28
29
29
- name: Build release distributions
30
30
run: |
31
-
# NOTE: put your own distribution build steps here.
31
+
python -m pip install --upgrade pip
32
32
python -m pip install build
33
33
python -m build
34
34
35
+
- name: Check distributions
36
+
run: |
37
+
python -m pip install twine
38
+
twine check dist/*
39
+
35
40
- name: Upload distributions
36
41
uses: actions/upload-artifact@v4
37
42
with:
@@ -50,12 +55,7 @@ jobs:
50
55
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
51
56
environment:
52
57
name: pypi
53
-
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
54
-
# url: https://pypi.org/p/YOURPROJECT
55
-
#
56
-
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
57
-
# ALTERNATIVE: exactly, uncomment the following line instead:
0 commit comments