From 0267762a91b06aec574dcc9cbfada450c4d3e6c4 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Mon, 23 Sep 2024 13:42:49 -0400 Subject: [PATCH] ci: move PyPI artifact uploading to GitLab --- .github/workflows/build_deploy.yml | 22 ---------------------- .gitlab/release.yml | 18 +++++++++--------- 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index c71c3db7ebd..6078279f846 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -77,25 +77,3 @@ jobs: run: python $GITHUB_WORKSPACE/tests/smoke_test.py # Move out of the workspace to avoid importing ddtrace from the source working-directory: / - - upload_pypi: - needs: - - build_wheels - - test_alpine_sdist - runs-on: ubuntu-latest - if: (github.event_name == 'release' && github.event.action == 'published') - steps: - - uses: actions/download-artifact@v4 - with: - path: dist - merge-multiple: true - - - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} - # To test: repository_url: https://test.pypi.org/legacy/ - # Setting skip_existing will prevent the deploy from erring out early - # due to a duplicate wheel being present which will ensure that the rest - # of the wheels will be uploaded if some are uploaded manually. - skip_existing: true diff --git a/.gitlab/release.yml b/.gitlab/release.yml index ec2bdfcb3ca..78000e5738e 100644 --- a/.gitlab/release.yml +++ b/.gitlab/release.yml @@ -33,15 +33,15 @@ variables: - pywheels/*.whl - pywheels/*.tar.gz -release_pypi_test: +# Can be used to validate uploading of artifacts +# release_pypi_test: +# extends: .release_pypi +# dependencies: [ "download_ddtrace_artifacts" ] +# variables: +# PYPI_REPOSITORY: testpypi + +release_pypi_prod: extends: .release_pypi dependencies: [ "download_ddtrace_artifacts" ] variables: - PYPI_REPOSITORY: testpypi - -# TODO: Replace GitHub Action PyPI upload with this job -# release_pypi_prod: -# extends: .release_pypi -# needs: [ "release_pypi_test" ] -# variables: -# PYPI_REPOSITORY: pypi + PYPI_REPOSITORY: pypi