From 64002bfd10805fe882e94ed1e08becd48d31154d Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Tue, 8 Nov 2022 16:18:40 +0300 Subject: [PATCH] cd: publish RPM artifacts Publish RPM artifacts on tag. To test, comment "run only on tags" condition, change RWS_REPO to https://rws-dev.tarantool.org. See [1] about OS support. 1. https://github.com/tarantool/tarantool-python/issues/257 Closes #164, part of #198 --- .github/workflows/packing.yml | 41 +++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + Makefile | 6 +++++ README.rst | 17 +++++++++++++++ docs/source/index.rst | 14 ++++++++++++ 5 files changed, 79 insertions(+) diff --git a/.github/workflows/packing.yml b/.github/workflows/packing.yml index 65a3a9df..79a519f0 100644 --- a/.github/workflows/packing.yml +++ b/.github/workflows/packing.yml @@ -335,3 +335,44 @@ jobs: - name: Run tests run: make test-pure-install + + publish_rpm: + if: startsWith(github.ref, 'refs/tags') + + needs: + - run_tests_rpm + + runs-on: ubuntu-20.04 + + 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 pip package artifacts + uses: actions/download-artifact@v3 + with: + name: rpm_dist_${{ matrix.target.os }}_${{ matrix.target.dist }} + path: rpm_dist + + - name: Publish artifacts + run: make rpm-dist-publish + 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 0cc8d93d..48ad56a1 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 artifacts with GitHub Actions (#198). - Publish pip artifacts with GitHub Actions (#198). - Pack RPM artifacts with GitHub Actions (#164, #198). +- Publish RPM artifacts with GitHub Actions (#164, #198). ### Changed - Bump msgpack requirement to 1.0.4 (PR #223). diff --git a/Makefile b/Makefile index a9b245db..df3ef056 100644 --- a/Makefile +++ b/Makefile @@ -61,3 +61,9 @@ rpm-dist: .PHONY: rpm-dist-check rpm-dist-check: rpm -K --nosignature rpm_dist/*.rpm + +.PHONY: rpm-dist-publish +rpm-dist-publish: + $(eval FILE_FLAGS := $(shell find rpm_dist/ -type f -regex '.*rpm' | xargs -I {} sh -c 'echo -F $$(basename {})=@{}' | xargs)) + curl -v -LfsS -X PUT ${RWS_REPO}/release/modules/${OS}/${DIST} \ + -F product=python3-tarantool $(FILE_FLAGS) -u ${RWS_AUTH} diff --git a/README.rst b/README.rst index fa08ffa4..40cacf49 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-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..8980471e 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-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