Skip to content

Commit 147484c

Browse files
cd: publish pip artifacts
Publish pip artifacts on tag. To test, comment "run only on tags" condition, change PYPI_REPO to testpypi and use ${{ secrets.TEST_PYPI_TOKEN }} as PYPI_TOKEN. You also need to remove 5dfdae5 commit changes about scm version and set some constant version: using local version identifiers [1] is not allowed by test.pypi.org. 1. https://peps.python.org/pep-0440/ Part of #198
1 parent 768212c commit 147484c

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

Diff for: .github/workflows/packing.yml

+36
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,39 @@ jobs:
176176
run: |
177177
cat tarantool.log || true
178178
kill $(cat tarantool.pid) || true
179+
180+
publish_pip:
181+
if: startsWith(github.ref, 'refs/tags')
182+
183+
needs:
184+
- run_tests_pip_package_linux
185+
- run_tests_pip_package_windows
186+
187+
runs-on: ubuntu-20.04
188+
189+
strategy:
190+
fail-fast: false
191+
192+
steps:
193+
- name: Clone the connector repo
194+
uses: actions/checkout@v3
195+
196+
- name: Setup Python and basic packing tools
197+
uses: actions/setup-python@v4
198+
with:
199+
python-version: '3.10'
200+
201+
- name: Install tools for package publishing
202+
run: pip3 install twine
203+
204+
- name: Download pip package artifacts
205+
uses: actions/download-artifact@v3
206+
with:
207+
name: pip_dist
208+
path: pip_dist
209+
210+
- name: Publish artifacts
211+
run: make pip-dist-publish
212+
env:
213+
PYPI_REPO: pypi
214+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
186186

187187
- Support iproto feature push (#201).
188188
- Pack pip artifacts with GitHub Actions (#198).
189+
- Publish pip artifacts with GitHub Actions (#198).
189190

190191
### Changed
191192
- Bump msgpack requirement to 1.0.4 (PR #223).

Diff for: Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,7 @@ pip-bdist:
4444
.PHONY: pip-dist-check
4545
pip-dist-check:
4646
twine check pip_dist/*
47+
48+
.PHONY: pip-dist-publish
49+
pip-dist-publish:
50+
twine upload -r testpypi -u __token__ -p ${PYPI_TOKEN} pip_dist/*

0 commit comments

Comments
 (0)