Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLIENT-1837] CI/CD: Add option to upload JFrog builds to PyPI #598

Merged
merged 3 commits into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/upload-jfrog-build-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish JFrog build to PyPI
on:
workflow_dispatch:
inputs:
version:
type: string
description: Build version
required: true
use-test-pypi:
type: boolean
description: 'DEBUG: upload to test.pypi.org?'
required: true
default: false

jobs:
publish-jfrog-build-to-pypi:
runs-on: ubuntu-22.04
steps:
- uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: ${{ secrets.JFROG_PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ secrets.JFROG_ACCESS_TOKEN }}

- name: Download JFrog build
run: jf rt dl --build python-client/${{ inputs.version }} ${{ vars.JFROG_REPO_NAME }}

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# This is the directory jf downloads the artifacts to
packages-dir: aerospike/${{ inputs.version }}/artifacts
repository-url: ${{ inputs.use-test-pypi && 'https://test.pypi.org/legacy/' || 'https://pypi.org/legacy/' }}
password: ${{ inputs.use-test-pypi && secrets.TEST_PYPI_API_TOKEN || secrets.PYPI_API_TOKEN }}
Loading