Skip to content

Commit 95c1cca

Browse files
cd: publish pip package
Publish pip package 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 5378649 commit 95c1cca

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

Diff for: .github/workflows/packing.yml

+36
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,39 @@ jobs:
174174
run: |
175175
cat tarantool.log || true
176176
kill $(cat tarantool.pid) || true
177+
178+
publish_pip:
179+
if: startsWith(github.ref, 'refs/tags')
180+
181+
needs:
182+
- run_tests_pip_package_linux
183+
- run_tests_pip_package_windows
184+
185+
runs-on: ubuntu-latest
186+
187+
strategy:
188+
fail-fast: false
189+
190+
steps:
191+
- name: Clone the connector repo
192+
uses: actions/checkout@v3
193+
194+
- name: Setup Python and basic packing tools
195+
uses: actions/setup-python@v4
196+
with:
197+
python-version: '3.10'
198+
199+
- name: Install tools for package publishing
200+
run: pip3 install twine
201+
202+
- name: Download pip package artifacts
203+
uses: actions/download-artifact@v3
204+
with:
205+
name: pip_dist
206+
path: pip_dist
207+
208+
- name: Publish artifacts
209+
run: twine upload -r $PYPI_REPO -u __token__ -p $PYPI_TOKEN pip_dist/*
210+
env:
211+
PYPI_REPO: pypi
212+
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 package with GitHub Actions (#198).
189+
- Publish pip package with GitHub Actions (#198).
189190

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

0 commit comments

Comments
 (0)