Skip to content

Commit

Permalink
cd: publish pip package
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DifferentialOrange committed Nov 9, 2022
1 parent caded10 commit 2f8b46c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/packing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,39 @@ jobs:
run: |
cat tarantool.log || true
kill $(cat tarantool.pid) || true
publish_pip:
if: startsWith(github.ref, 'refs/tags')

needs:
- run_tests_pip_package_linux
- run_tests_pip_package_windows

runs-on: ubuntu-latest

strategy:
fail-fast: false

steps:
- name: Clone the connector repo
uses: actions/checkout@v3

- name: Setup Python and basic packing tools
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install tools for package publishing
run: pip3 install twine

- name: Download pip package artifacts
uses: actions/download-artifact@v3
with:
name: pip_dist
path: pip_dist

- name: Publish artifacts
run: twine upload -r $PYPI_REPO -u __token__ -p $PYPI_TOKEN pip_dist/*
env:
PYPI_REPO: pypi
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Support iproto feature push (#201).
- Pack pip package with GitHub Actions (#198).
- Publish pip package with GitHub Actions (#198).

### Changed
- Bump msgpack requirement to 1.0.4 (PR #223).
Expand Down

0 comments on commit 2f8b46c

Please sign in to comment.