Release Python SDK #89
Workflow file for this run
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: Release Python SDK | |
run-name: Release Python SDK | |
on: | |
push: | |
tags: | |
- "*.*.*" # version, e.g. 1.0.0 | |
jobs: | |
build-python: | |
uses: ./.github/workflows/build-python.yml | |
test-rust-crate: | |
uses: ./.github/workflows/rust-test.yml | |
secrets: | |
INFISICAL_UNIVERSAL_CLIENT_SECRET: ${{ secrets.INFISICAL_UNIVERSAL_CLIENT_SECRET }} | |
INFISICAL_UNIVERSAL_CLIENT_ID: ${{ secrets.INFISICAL_UNIVERSAL_CLIENT_ID }} | |
INFISICAL_PROJECT_ID: ${{ secrets.INFISICAL_PROJECT_ID }} | |
INFISICAL_SITE_URL: ${{ secrets.INFISICAL_SITE_URL }} | |
setup: | |
needs: | |
- test-rust-crate | |
- 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: actions/download-artifact@v4 | |
with: | |
path: ${{ github.workspace }}/target/wheels/dist | |
- name: List packages | |
run: ls -R ./target/wheels/dist | |
shell: bash | |
- 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 | |
working-directory: ${{ github.workspace }}/target/wheels | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: twine upload --repository pypi dist/* |