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
# This workflow will upload a Python Package using Twine 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
1
+
# .github/workflows/python-publish.yml
2
+
3
+
# This workflow will upload a Python Package to PyPI using Twine when a release is created.
4
+
# For more information, see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
5
4
6
name: Upload Python Package
5
7
@@ -9,50 +11,43 @@ on:
9
11
10
12
permissions:
11
13
contents: read
14
+
packages: write # Needed for uploading to PyPI
12
15
13
16
jobs:
14
17
deploy:
15
-
16
18
runs-on: ubuntu-latest
17
19
18
20
steps:
19
-
# Step 1: Checkout the code from the repository
20
-
- uses: actions/checkout@v4
21
-
22
-
# Step 2: Set up Python version
23
-
- name: Set up Python
24
-
uses: actions/setup-python@v3
25
-
with:
26
-
python-version: '3.x'
27
-
28
-
# Step 3: Cache pip dependencies for faster builds
0 commit comments