From 36d82c7106989a3c421dcbb6a8b462610d529f78 Mon Sep 17 00:00:00 2001 From: Sweta Yadav <106366788+swetayadav1@users.noreply.github.com> Date: Thu, 2 May 2024 03:14:03 -0700 Subject: [PATCH] NXPY-259: Deploy artifacts to packages.nuxeo.com (#312) * Release fix: Upload nuxeo-python-client to packages --- .github/workflows/release.yml | 25 ++++++++++++++++--------- CHANGELOG.rst | 3 +++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1286eb1..1bb4b63 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,9 +21,9 @@ jobs: python-version: 3.9 - run: python -m pip install -U pip setuptools wheel - run: python setup.py bdist_wheel - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: python-package-distributions + name: python-package-distributions-wheel path: ./dist/*.whl source-distribution: @@ -37,9 +37,9 @@ jobs: with: python-version: 3.9 - run: python setup.py sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: python-package-distributions + name: python-package-distributions-source path: dist publish: @@ -48,13 +48,20 @@ jobs: - source-distribution runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: python-package-distributions + pattern: python-package-distributions-* path: dist/ + merge-multiple: true - run: ls -l dist - - uses: pypa/gh-action-pypi-publish@release/v1 + + - name: Upload Python Client on PyPi API Packages + uses: pypa/gh-action-pypi-publish@release/v1 + env: + PYPI_API_REPO_URL: ${{ github.ref == 'refs/heads/master' && 'public' || 'private' }} with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + repository-url: "https://packages.nuxeo.com/repository/pypi-${{ env.PYPI_API_REPO_URL }}/" + user: ${{ secrets.PYPI_API_NUXEO_PACKAGE_USERNAME }} + password: ${{ secrets.PYPI_API_NUXEO_PACKAGE_TOKEN }} skip_existing: true + verbose: true diff --git a/CHANGELOG.rst b/CHANGELOG.rst index eaf3199..16248e9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,7 @@ Release date: ``2024-04-18`` - `NXPY-255 `__: Fix Test cases for moto3 - `NXPY-256 `__: Upgrade from Node 16 to 20 - `NXPY-258 `__: File download from aws S3 with auto-redirect not working in case of OAuth +- `NXPY-259 `__: Deploy artifacts to packages.nuxeo.com Technical changes ----------------- @@ -23,6 +24,8 @@ Minor changes ----------------- - Upgraded `actions/checkout` from 3 to 4 +- Upgraded `actions/download-artifact` from 3 to 4 +- Upgraded `actions/upload-artifact` from 3 to 4 - Upgraded `actions/setup-python` from 4 to 5 - Upgraded `codecov/codecov-action` from 3.1.2 to 3.1.5 - Upgraded `pypa/gh-action-pypi-publish` from master to release/v1