Skip to content

Commit def8d91

Browse files
committed
Add pypi steps
1 parent 6a52534 commit def8d91

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- develop
88
- main
99
tags:
10-
- *
10+
- "*"
1111

1212

1313
jobs:
@@ -133,7 +133,8 @@ jobs:
133133
env:
134134
PYTHON_ISAL_LINK_DYNAMIC: True
135135

136-
buildwheels:
136+
deploy:
137+
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
137138
runs-on: ${{ matrix.os }}
138139
needs: [lint, docs, test-static, test-dynamic, twine_check]
139140
#if: startsWith(github.ref, 'refs/tags')
@@ -158,11 +159,22 @@ jobs:
158159
CIBW_SKIP: "*-win32 *-manylinux_i686" # Skip 32 bit.
159160
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
160161
# Below command fails when data is not correctly statically linked
162+
# Full tests not needed: these are done prior to building.
161163
CIBW_TEST_COMMAND: "python -c 'from isal import isal_zlib, igzip; isal_zlib.adler32(b\"bla\")'"
162164
- name: Build sdist
163165
if: "runner.os == 'Linux'"
164166
run: python setup.py sdist
165-
- uses: actions/upload-artifact@v2
167+
- name: Publish package to TestPyPI
168+
uses: pypa/gh-action-pypi-publish@master
169+
# Alpha, Beta and dev releases contain a - in the tag.
170+
if: contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')
166171
with:
167-
name: ${{matrix.os}}_wheels
168-
path: dist/
172+
user: __token__
173+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
174+
repository_url: https://test.pypi.org/legacy/
175+
- name: Publish package to PyPI
176+
uses: pypa/gh-action-pypi-publish@master
177+
if: !contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')
178+
with:
179+
user: __token__
180+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)