diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 72f9643f..fdc919cb 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -5,98 +5,104 @@ on: push jobs: build: name: Build distribution 📦 + # ensure the workflow is never executed on forked branches + # it would fail anyway, so we just avoid to see an error + if: ${{ github.repository == 'containers/podman-py' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" - - name: Install pypa/build - run: >- - python3 -m - pip install - build - --user - - name: Build a binary wheel and a source tarball - run: python3 -m build - - name: Store the distribution packages - uses: actions/upload-artifact@v4 - with: - name: python-package-distributions - path: dist/ + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ publish-to-pypi: name: >- Publish Python 🐍 distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + if: startsWith(github.ref, 'refs/tags/') && github.repository == 'containers/podman-py' needs: - - build + - build runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/p/podman permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing + id-token: write # IMPORTANT: mandatory for trusted publishing steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: dist/ - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 github-release: name: >- Sign the Python 🐍 distribution 📦 with Sigstore and upload them to GitHub Release + if: github.repository == 'containers/podman-py' needs: - - publish-to-pypi + - publish-to-pypi runs-on: ubuntu-latest permissions: - contents: write # IMPORTANT: mandatory for making GitHub Releases - id-token: write # IMPORTANT: mandatory for sigstore + contents: write # IMPORTANT: mandatory for making GitHub Releases + id-token: write # IMPORTANT: mandatory for sigstore steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: dist/ - - name: Sign the dists with Sigstore - uses: sigstore/gh-action-sigstore-python@v3.0.0 - with: - inputs: >- - ./dist/*.tar.gz - ./dist/*.whl - - name: Create GitHub Release - env: - GITHUB_TOKEN: ${{ github.token }} - run: >- - gh release create - '${{ github.ref_name }}' - --repo '${{ github.repository }}' - --notes "" - - name: Upload artifact signatures to GitHub Release - env: - GITHUB_TOKEN: ${{ github.token }} - # Upload to GitHub Release using the `gh` CLI. - # `dist/` contains the built packages, and the - # sigstore-produced signatures and certificates. - run: >- - gh release upload - '${{ github.ref_name }}' dist/** - --repo '${{ github.repository }}' + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Sign the dists with Sigstore + uses: sigstore/gh-action-sigstore-python@v3.0.0 + with: + inputs: >- + ./dist/*.tar.gz + ./dist/*.whl + + - name: Create GitHub Release + env: + GITHUB_TOKEN: ${{ github.token }} + run: >- + gh release create + '${{ github.ref_name }}' + --repo '${{ github.repository }}' + --generate-notes + - name: Upload artifact signatures to GitHub Release + env: + GITHUB_TOKEN: ${{ github.token }} + # Upload to GitHub Release using the `gh` CLI. + # `dist/` contains the built packages, and the + # sigstore-produced signatures and certificates. + run: >- + gh release upload + '${{ github.ref_name }}' dist/** + --repo '${{ github.repository }}' publish-to-testpypi: name: Publish Python 🐍 distribution 📦 to TestPyPI + if: github.repository == 'containers/podman-py' needs: - - build + - build runs-on: ubuntu-latest environment: @@ -104,15 +110,15 @@ jobs: url: https://test.pypi.org/p/podman permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing + id-token: write # IMPORTANT: mandatory for trusted publishing steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: dist/ - - name: Publish distribution 📦 to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/.packit.yaml b/.packit.yaml index ffeab598..b3dd425e 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -23,6 +23,7 @@ jobs: # Copr builds for Fedora - job: copr_build trigger: pull_request + identifier: pr-fedora packages: [python-podman-fedora] targets: - fedora-all @@ -30,6 +31,7 @@ jobs: # Copr builds for CentOS Stream - job: copr_build trigger: pull_request + identifier: pr-centos packages: [python-podman-centos] targets: - centos-stream-10 @@ -38,6 +40,7 @@ jobs: # Copr builds for RHEL - job: copr_build trigger: pull_request + identifier: pr-rhel packages: [python-podman-rhel] targets: - epel-9 @@ -45,6 +48,7 @@ jobs: # Run on commit to main branch - job: copr_build trigger: commit + identifier: commit-fedora packages: [python-podman-fedora] branch: main owner: rhcontainerbot @@ -82,6 +86,7 @@ jobs: # This test might break based on the OS and lint used, so we follow fedora-latest as a reference - job: tests trigger: pull_request + identifier: upstream-sanity tmt_plan: /upstream/sanity packages: [python-podman-fedora] targets: @@ -90,6 +95,7 @@ jobs: - job: tests trigger: pull_request + identifier: upstream-all-fedora tmt_plan: /upstream/all packages: [python-podman-fedora] targets: @@ -97,6 +103,7 @@ jobs: - job: tests trigger: pull_request + identifier: upstream-base-centos tmt_plan: /upstream/base packages: [python-podman-centos] targets: @@ -105,6 +112,7 @@ jobs: - job: tests trigger: pull_request + identifier: upstream-base-rhel tmt_plan: /upstream/base packages: [python-podman-rhel] targets: diff --git a/Makefile b/Makefile index ce1f961b..5f848f49 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ DESTDIR ?= EPOCH_TEST_COMMIT ?= $(shell git merge-base $${DEST_BRANCH:-main} HEAD) HEAD ?= HEAD -export PODMAN_VERSION ?= "5.3.0" +export PODMAN_VERSION ?= "5.4.0" .PHONY: podman podman: diff --git a/podman/tests/__init__.py b/podman/tests/__init__.py index 9b777808..0815b2e5 100644 --- a/podman/tests/__init__.py +++ b/podman/tests/__init__.py @@ -3,5 +3,5 @@ # Do not auto-update these from version.py, # as test code should be changed to reflect changes in Podman API versions BASE_SOCK = "unix:///run/api.sock" -LIBPOD_URL = "http://%2Frun%2Fapi.sock/v5.3.0/libpod" +LIBPOD_URL = "http://%2Frun%2Fapi.sock/v5.4.0/libpod" COMPATIBLE_URL = "http://%2Frun%2Fapi.sock/v1.40" diff --git a/podman/version.py b/podman/version.py index 705ff65d..b4c2958b 100644 --- a/podman/version.py +++ b/podman/version.py @@ -1,4 +1,4 @@ """Version of PodmanPy.""" -__version__ = "5.3.0" +__version__ = "5.4.0" __compatible_version__ = "1.40" diff --git a/setup.cfg b/setup.cfg index d31a2479..5782d074 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = podman -version = 5.3.0 +version = 5.4.0 author = Brent Baude, Jhon Honce, Urvashi Mohnani, Nicola Sella author_email = jhonce@redhat.com description = Bindings for Podman RESTful API