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://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
-
4
-
name: Upload Python Package
1
+
name: Upload Python Package to PyPI when a Release is Created
5
2
6
3
on:
7
4
release:
8
5
types: [created]
9
6
10
7
jobs:
11
-
deploy:
12
-
8
+
pypi-publish:
9
+
name: Publish release to PyPI
13
10
runs-on: ubuntu-latest
14
-
11
+
environment:
12
+
name: pypi
13
+
url: https://pypi.org/p/socid_extractor
14
+
permissions:
15
+
id-token: write
15
16
steps:
16
-
- uses: actions/checkout@v2
17
-
- name: Set up Python
18
-
uses: actions/setup-python@v2
19
-
with:
20
-
python-version: '3.x'
21
-
- name: Install dependencies
22
-
run: |
23
-
python -m pip install --upgrade pip
24
-
pip install setuptools wheel twine
25
-
- name: Build and publish
26
-
env:
27
-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28
-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29
-
run: |
30
-
python setup.py sdist bdist_wheel
31
-
twine upload dist/*
17
+
- uses: actions/checkout@v4
18
+
- name: Set up Python
19
+
uses: actions/setup-python@v4
20
+
with:
21
+
python-version: "3.x"
22
+
- name: Install dependencies
23
+
run: |
24
+
python -m pip install --upgrade pip
25
+
pip install setuptools wheel
26
+
- name: Build package
27
+
run: |
28
+
python setup.py sdist bdist_wheel # Could also be python -m build
0 commit comments