Skip to content

Commit d4e2bfa

Browse files
authored
Update test_and_deploy.yml
1 parent 6505975 commit d4e2bfa

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

.github/workflows/test_and_deploy.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -65,27 +65,31 @@ jobs:
6565
uses: codecov/codecov-action@v2
6666

6767
deploy:
68-
# this will run when you have tagged a commit, starting with "v*"
69-
# and requires that you have put your twine API key in your
70-
# github secrets (see readme for details)
71-
needs: [test]
72-
runs-on: ubuntu-latest
73-
if: contains(github.ref, 'tags')
74-
steps:
75-
- uses: actions/checkout@v2
76-
- name: Set up Python
77-
uses: actions/setup-python@v2
78-
with:
79-
python-version: "3.x"
80-
- name: Install dependencies
81-
run: |
82-
python -m pip install --upgrade pip
83-
pip install -U setuptools setuptools_scm wheel twine build
84-
- name: Build and publish
85-
env:
86-
TWINE_USERNAME: __token__
87-
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
88-
run: |
89-
git tag
90-
python -m build .
91-
twine upload dist/*
68+
# This will run when you have tagged a commit starting with "v*"
69+
needs: [test]
70+
runs-on: ubuntu-latest
71+
if: contains(github.ref, 'tags')
72+
73+
steps:
74+
- uses: actions/checkout@v2
75+
76+
- name: Set up Python
77+
uses: actions/setup-python@v2
78+
with:
79+
python-version: "3.8" # Pin a specific version of Python (adjust if needed)
80+
81+
- name: Install dependencies
82+
run: |
83+
python -m pip install --upgrade pip
84+
pip install -U setuptools setuptools_scm wheel twine build cibuildwheel
85+
86+
- name: Build and publish
87+
env:
88+
TWINE_USERNAME: __token__
89+
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
90+
run: |
91+
# Build the package with cibuildwheel for compatibility with manylinux
92+
cibuildwheel --output-dir dist
93+
94+
# Upload to PyPI using Twine
95+
twine upload dist/*

0 commit comments

Comments
 (0)