diff --git a/.github/workflows/packing.yml b/.github/workflows/packing.yml index 07b30058..69e06b37 100644 --- a/.github/workflows/packing.yml +++ b/.github/workflows/packing.yml @@ -333,3 +333,50 @@ jobs: - name: Run tests run: make test-pure-install + + publish_rpm: + if: startsWith(github.ref, 'refs/tags') + + needs: + - run_tests_rpm + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + + matrix: + target: + - os: fedora + dist: '34' + - os: fedora + dist: '35' + - os: fedora + dist: '36' + + 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 RPM artifacts + uses: actions/download-artifact@v3 + with: + name: rpm_dist_${{ matrix.target.os }}_${{ matrix.target.dist }} + path: rpm_dist + + - name: Publish artifacts + run: | + export FILE_FLAGS=$(find rpm_dist/ -type f -regex '.*\.rpm' \ + | 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 bc960947..b98fea5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -188,6 +188,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Pack pip package with GitHub Actions (#198). - Publish pip package with GitHub Actions (#198). - Pack RPM package with GitHub Actions (#164, #198). +- Publish RPM package with GitHub Actions (#164, #198). ### Changed - Bump msgpack requirement to 1.0.4 (PR #223). diff --git a/README.rst b/README.rst index fa08ffa4..c8ea58f4 100644 --- a/README.rst +++ b/README.rst @@ -26,6 +26,23 @@ The recommended way to install the ``tarantool`` package is using ``pip``. $ pip3 install tarantool +With dnf +^^^^^^^^ + +You can install ``python3-tarantool`` RPM package if you use Fedora (34, 35, 36). + +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 + + $ dnf install -y python3-tarantool + ZIP archive ^^^^^^^^^^^ diff --git a/docs/source/index.rst b/docs/source/index.rst index 7f094b7e..47939873 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -14,6 +14,20 @@ Install Tarantool Python connector with ``pip`` (`PyPI`_ page): $ pip3 install tarantool +Otherwise, you can install ``python3-tarantool`` RPM package if you use Fedora (34, 35, 36). + +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 + + $ dnf install -y python3-tarantool + Source code is available on `GitHub`_. Documentation