Skip to content

Build and push SDK to Test PyPi #6

Build and push SDK to Test PyPi

Build and push SDK to Test PyPi #6

name: "Build and push SDK to Test PyPi"
on:
workflow_dispatch:
jobs:
pypi-publish:
name: Upload release to Test PyPI
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
# retrieve your distributions here
# Setup Python
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
token: ${{secrets.DEVREL_SERVICE_TOKEN}}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install build and twine packages
id: requirements
run: |
python -m pip install --upgrade build
python -m pip install --upgrade twine
- name: Build sailpoint package
id: build
if: steps.requirements.outcome == 'success'
run: |
cd sailpoint/
python -m build
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@v3
env:
JF_URL: https://sailpoint.jfrog.io
JF_ACCESS_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN_DEV }}
- name: Publish distribution to JFrog
run: |
# Ping the server (test connection)
jf rt ping
# Upload the package
jf rt u sailpoint/dist/* sp-pypi-dev
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{secrets.ARTIFACTORY_TOKEN_DEV}}
# repository-url: https://sailpoint.jfrog.io/artifactory/sp-pypi-dev/
# packages-dir: sailpoint/dist/