Build and push SDK to Test PyPi #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
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 dist/sailpoint-1.0.0-py3-none-any.whl sp-pypi-dev | |
jf rt u dist/sailpoint-1.0.0.tar.gz 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/ |