From 53b3b511c95eef3cde87f532e5ba83cc7ecff50e Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Tue, 8 Nov 2022 18:08:16 +0300 Subject: [PATCH] cd: publish deb package Publish deb artifacts on tag. To test, comment "run only on tags" condition, change RWS_REPO to https://rws-dev.tarantool.org. See [1] about other OS support. 1. https://github.com/tarantool/tarantool-python/issues/257 Closes #198 --- .github/workflows/packing.yml | 49 +++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + README.rst | 18 +++++++++++++ docs/source/index.rst | 15 +++++++++++ 4 files changed, 83 insertions(+) diff --git a/.github/workflows/packing.yml b/.github/workflows/packing.yml index a69f4c04..e413d4e1 100644 --- a/.github/workflows/packing.yml +++ b/.github/workflows/packing.yml @@ -494,3 +494,52 @@ jobs: - name: Run tests run: make test-pure-install + + publish_deb: + if: startsWith(github.ref, 'refs/tags') + + needs: + - run_tests_deb + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + + matrix: + target: + - os: ubuntu + dist: focal # 20.04 + - os: ubuntu + dist: jammy # 22.04 + - os: debian + dist: buster # 10 + - os: debian + dist: bullseye # 11 + + steps: + - name: Clone the connector repo + uses: actions/checkout@v3 + + - name: Install tools for package publishing + run: sudo apt install -y curl make + + - name: Download deb artifacts + uses: actions/download-artifact@v3 + with: + name: deb_dist + path: deb_dist + + - name: Publish artifacts + run: | + export FILE_FLAGS=$(find deb_dist/ -type f -regex '.*\.deb' -or -regex '.*\.dsc' \ + | xargs -I {} sh -c 'echo -F $(basename {})=@{}' \ + | xargs) + echo $FILE_FLAGS + curl -v -LfsS -X PUT $RWS_REPO/release/modules/$OS/$DIST \ + -F product=python3-tarantool $FILE_FLAGS -u $RWS_AUTH + env: + RWS_REPO: https://rws.tarantool.org + RWS_AUTH: ${{ secrets.RWS_AUTH }} + OS: ${{ matrix.target.os }} + DIST: ${{ matrix.target.dist }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 12b7ea27..7a99faff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -190,6 +190,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Pack RPM package with GitHub Actions (#164, #198). - Publish RPM package with GitHub Actions (#164, #198). - Pack deb package with GitHub Actions (#198). +- Publish deb package with GitHub Actions (#198). ### Changed - Bump msgpack requirement to 1.0.4 (PR #223). diff --git a/README.rst b/README.rst index c8ea58f4..ff92c6cd 100644 --- a/README.rst +++ b/README.rst @@ -43,6 +43,24 @@ and then install the package $ dnf install -y python3-tarantool +With apt +^^^^^^^^ + +You can install ``python3-tarantool`` deb package if you use +Debian (10, 11) or Ubuntu (20.04, 22.04). + +Add the repository + +.. code-block:: bash + + $ curl -L https://tarantool.io/OtKysgx/release/2/installer.sh | bash + +and then install the package + +.. code-block:: bash + + $ apt install -y python3-tarantool + ZIP archive ^^^^^^^^^^^ diff --git a/docs/source/index.rst b/docs/source/index.rst index 47939873..a8b7cc38 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -28,6 +28,21 @@ and then install the package $ dnf install -y python3-tarantool +Otherwise, you can install ``python3-tarantool`` deb package if you use Debian (10, 11) +or Ubuntu (20.04, 22.04). + +Add the repository + +.. code-block:: bash + + $ curl -L https://tarantool.io/OtKysgx/release/2/installer.sh | bash + +and then install the package + +.. code-block:: bash + + $ apt install -y python3-tarantool + Source code is available on `GitHub`_. Documentation