Skip to content

Update build-python.yml #70

Update build-python.yml

Update build-python.yml #70

---
name: Publish Python SDK
on:
push:
branches:
- "python-test"
jobs:
build-python:
uses: ./.github/workflows/build-python.yml
setup:
needs:
- build-python
name: Setup
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
publish:
name: Publish
runs-on: ubuntu-22.04
needs:
- setup
steps:
- name: Install Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: "3.9"
- name: Install twine
run: pip install twine
- name: Download artifacts
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0
with:
workflow: build-python.yml
path: ${{ github.workspace }}/target/wheels/dist
workflow_conclusion: success
name: infisical_python(.*)
name_is_regexp: true
- name: Move files
working-directory: ${{ github.workspace }}/target/wheels/dist
run: |
find . -maxdepth 2 -type f -print0 | xargs -0 mv -t .
rm -rf */
- name: Check
working-directory: ${{ github.workspace }}/target/wheels
run: twine check dist/*
- name: Publish (DRY RUN ENABLED!)
working-directory: ${{ github.workspace }}/target/wheels
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload --repository testpypi dist/*