From e16af1ac610113503ec446dd39b85b2882bcade7 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:20:17 +0400 Subject: [PATCH 01/18] New Python CI --- .github/disabled-workflows/release-python.yml | 322 +++++++++++++++++ .github/workflows/build-python.yml | 188 ++++++++++ .github/workflows/release-python.yml | 340 ++---------------- 3 files changed, 546 insertions(+), 304 deletions(-) create mode 100644 .github/disabled-workflows/release-python.yml create mode 100644 .github/workflows/build-python.yml diff --git a/.github/disabled-workflows/release-python.yml b/.github/disabled-workflows/release-python.yml new file mode 100644 index 0000000..461f4ef --- /dev/null +++ b/.github/disabled-workflows/release-python.yml @@ -0,0 +1,322 @@ +name: Release Python SDK +run-name: Release Python SDK + +on: + push: + tags: + - "*.*.*" + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.sha }} + cancel-in-progress: true + +permissions: + contents: write + packages: write + +jobs: + generate_schemas: + uses: ./.github/workflows/generate-schemas.yml + + test-rust-crate: + uses: ./.github/workflows/rust-test.yml + + bump-version: + name: Version changes + needs: + - generate_schemas + - test-rust-crate + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ github.head_ref }} + + - name: Install python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Bump versions (pyproject.toml / Cargo.toml) + run: | + cd ./crates/infisical-py + pip install poetry + poetry self add poetry-bumpversion + poetry version ${{ github.ref_name }} + cd ../.. + + - name: Upload Cargo.toml artifact + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: Cargo.toml + path: ./crates/infisical-py/Cargo.toml + - name: Upload pyproject.toml artifact + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: pyproject.toml + path: ./crates/infisical-py/pyproject.toml + + - name: Upload __init__.py artifact + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: __init__.py + path: ./crates/infisical-py/infisical_client/__init__.py + + linux: + runs-on: ubuntu-20.04 + needs: + - bump-version + - sdist + strategy: + matrix: + target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ github.head_ref }} + + - name: Delete existing version files + run: | + rm -rf ./crates/infisical-py/Cargo.toml + rm -rf ./crates/infisical-py/pyproject.toml + rm -rf ./crates/infisical-py/infisical_client/__init__.py + + - name: Download Cargo.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: Cargo.toml + path: ./crates/infisical-py/ + - name: Download pyproject.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: pyproject.toml + path: ./crates/infisical-py/ + + - name: Download __init__.py artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: __init__.py + path: ./crates/infisical-py/infisical_client/ + + - name: Retrieve Type Definitions + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: schemas.py + path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ + + #sudo apt install libssl-dev + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libssl-dev + sudo apt-get install -y pkg-config + + - name: Build wheels + uses: PyO3/maturin-action@v1 + env: + # Make psm compile, see https://github.com/rust-lang/stacker/issues/79 + CFLAGS_s390x_unknown_linux_gnu: "-march=z10" + # Workaround ring 0.17 build issue + CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8" + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter --verbose --manifest-path ./crates/infisical-py/Cargo.toml + sccache: "true" + manylinux: auto + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + windows: + runs-on: windows-latest + needs: + - bump-version + - generate_schemas + - sdist + strategy: + matrix: + target: [x64, x86] + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Delete existing version files + run: | + del ./crates/infisical-py/Cargo.toml + del ./crates/infisical-py/pyproject.toml + del ./crates/infisical-py/infisical_client/__init__.py + + - name: Download Cargo.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: Cargo.toml + path: ./crates/infisical-py/ + - name: Download pyproject.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: pyproject.toml + path: ./crates/infisical-py/ + + - name: Download __init__.py artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: __init__.py + path: ./crates/infisical-py/infisical_client/ + + - name: Retrieve Type Definitions + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: schemas.py + path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ + + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + architecture: ${{ matrix.target }} + + - uses: dtolnay/rust-toolchain@stable + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --verbose --manifest-path ./crates/infisical-py/Cargo.toml + sccache: "true" + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + macos: + runs-on: macos-latest + needs: + - bump-version + - generate_schemas + - sdist + strategy: + matrix: + target: [aarch64, x86_64] + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Delete existing version files + run: | + rm -rf ./crates/infisical-py/Cargo.toml + rm -rf ./crates/infisical-py/pyproject.toml + rm -rf ./crates/infisical-py/infisical_client/__init__.py + + - name: Download Cargo.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: Cargo.toml + path: ./crates/infisical-py/ + - name: Download pyproject.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: pyproject.toml + path: ./crates/infisical-py/ + + - name: Download __init__.py artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: __init__.py + path: ./crates/infisical-py/infisical_client/ + + - name: Retrieve Type Definitions + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: schemas.py + path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ + + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + - uses: dtolnay/rust-toolchain@stable + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --verbose --manifest-path ./crates/infisical-py/Cargo.toml + sccache: "true" + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + sdist: + runs-on: ubuntu-latest + needs: + - bump-version + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ github.head_ref }} + + - name: Delete existing version files + run: | + rm -rf ./crates/infisical-py/Cargo.toml + rm -rf ./crates/infisical-py/pyproject.toml + rm -rf ./crates/infisical-py/infisical_client/__init__.py + + - name: Download Cargo.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: Cargo.toml + path: ./crates/infisical-py/ + - name: Download pyproject.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: pyproject.toml + path: ./crates/infisical-py/ + + - name: Download __init__.py artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: __init__.py + path: ./crates/infisical-py/infisical_client/ + + - name: Retrieve Type Definitions + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: schemas.py + path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ + + - name: Build sdist + uses: PyO3/maturin-action@v1 + with: + command: sdist + args: --out dist --manifest-path ./crates/infisical-py/Cargo.toml + - name: Upload sdist + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + release: + name: Release + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + # linux, windows + needs: [sdist, macos, linux, windows] + steps: + - uses: actions/download-artifact@v3 + with: + name: wheels + - name: Publish to PyPI + uses: PyO3/maturin-action@v1 + env: + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + with: + command: upload + args: --skip-existing * diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml new file mode 100644 index 0000000..fcf6aa7 --- /dev/null +++ b/.github/workflows/build-python.yml @@ -0,0 +1,188 @@ +--- +name: Build Python + +on: + workflow_call: + +jobs: + generate_schemas: + uses: ./.github/workflows/generate-schemas.yml + + bump-version: + name: Version changes + needs: + - generate_schemas + # - test-rust-crate + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ github.head_ref }} + + - name: Install python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Bump versions (pyproject.toml / Cargo.toml) + run: | + cd ./crates/infisical-py + pip install poetry + poetry self add poetry-bumpversion + poetry version ${{ github.ref_name }} + cd ../.. + + - name: Upload Cargo.toml artifact + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: Cargo.toml + path: ./crates/infisical-py/Cargo.toml + - name: Upload pyproject.toml artifact + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: pyproject.toml + path: ./crates/infisical-py/pyproject.toml + + - name: Upload __init__.py artifact + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: __init__.py + path: ./crates/infisical-py/infisical_client/__init__.py + + setup: + name: Setup + runs-on: ubuntu-22.04 + steps: + - name: Checkout repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + build: + name: Building Python wheel for - ${{ matrix.settings.os }} - ${{ matrix.settings.target }} + runs-on: ${{ matrix.settings.os || 'ubuntu-latest' }} + needs: + - generate_schemas + - bump-version + - setup + env: + _PACKAGE_VERSION: ${{ github.ref_name }} + strategy: + fail-fast: false + matrix: + settings: + - os: macos-12 + target: x86_64-apple-darwin + + - os: macos-12 + target: aarch64-apple-darwin + + - os: windows-2022 + target: x86_64-pc-windows-msvc + + - os: ubuntu-22.04 + target: x86_64-unknown-linux-gnu + + - os: ubuntu-22.04 + target: aarch64-unknown-linux-gnu + + steps: + - name: Checkout repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Setup Node + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 + with: + node-version: 18 + + - name: Install rust + uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # stable + with: + toolchain: stable + targets: ${{ matrix.settings.target }} + + - name: Cache cargo registry + uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 + with: + key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }} + + # + # + # + # + # + # + + - name: Delete existing version files + run: | + rm -rf ./crates/infisical-py/Cargo.toml + rm -rf ./crates/infisical-py/pyproject.toml + rm -rf ./crates/infisical-py/infisical_client/__init__.py + + - name: Download Cargo.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: Cargo.toml + path: ./crates/infisical-py/ + - name: Download pyproject.toml artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: pyproject.toml + path: ./crates/infisical-py/ + + - name: Download __init__.py artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: __init__.py + path: ./crates/infisical-py/infisical_client/ + + - name: Retrieve Type Definitions + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: schemas.py + path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ + + # + # + # + # + # + # + # + # + # + + - name: Build wheels + if: ${{ matrix.settings.target != 'x86_64-unknown-linux-gnu' }} + uses: PyO3/maturin-action@a3013db91b2ef2e51420cfe99ee619c8e72a17e6 # v1.40.8 + with: + target: ${{ matrix.settings.target }} + args: --release --find-interpreter --sdist + sccache: "true" + manylinux: "2_28" # https://github.com/pola-rs/polars/pull/12211 + working-directory: ${{ github.workspace }}/crates/infisical-py + + - name: Build wheels (Linux - x86_64) + if: ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }} + uses: PyO3/maturin-action@a3013db91b2ef2e51420cfe99ee619c8e72a17e6 # v1.40.8 + with: + target: ${{ matrix.settings.target }} + args: --release --find-interpreter --sdist + container: quay.io/pypa/manylinux_2_28_x86_64:2023-11-20-745eb52 + sccache: "true" + manylinux: "2_28" # https://github.com/pola-rs/polars/pull/12211 + working-directory: ${{ github.workspace }}/crates/infisical-py + + - name: Upload wheels + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: infisical_python-${{ env._PACKAGE_VERSION }}-${{ matrix.settings.target }} + path: ${{ github.workspace }}/target/wheels/infisical_python*.whl + + - name: Upload sdists + if: ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }} # we only need one sdist + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: infisical_python-${{ env._PACKAGE_VERSION }}-sdist + path: ${{ github.workspace }}/target/wheels/infisical_python-*.tar.gz diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 461f4ef..94e7b61 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -1,322 +1,54 @@ -name: Release Python SDK -run-name: Release Python SDK +--- +name: Publish Python SDK on: push: - tags: - - "*.*.*" - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.sha }} - cancel-in-progress: true - -permissions: - contents: write - packages: write + branches: + - "python-test" jobs: - generate_schemas: - uses: ./.github/workflows/generate-schemas.yml - - test-rust-crate: - uses: ./.github/workflows/rust-test.yml - - bump-version: - name: Version changes - needs: - - generate_schemas - - test-rust-crate - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') + setup: + name: Setup + runs-on: ubuntu-22.04 steps: - - name: Checkout - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ref: ${{ github.head_ref }} - - - name: Install python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Bump versions (pyproject.toml / Cargo.toml) - run: | - cd ./crates/infisical-py - pip install poetry - poetry self add poetry-bumpversion - poetry version ${{ github.ref_name }} - cd ../.. - - - name: Upload Cargo.toml artifact - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - name: Cargo.toml - path: ./crates/infisical-py/Cargo.toml - - name: Upload pyproject.toml artifact - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - name: pyproject.toml - path: ./crates/infisical-py/pyproject.toml - - - name: Upload __init__.py artifact - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - name: __init__.py - path: ./crates/infisical-py/infisical_client/__init__.py - - linux: - runs-on: ubuntu-20.04 - needs: - - bump-version - - sdist - strategy: - matrix: - target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] - steps: - - name: Checkout + - name: Checkout repo uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ref: ${{ github.head_ref }} - - - name: Delete existing version files - run: | - rm -rf ./crates/infisical-py/Cargo.toml - rm -rf ./crates/infisical-py/pyproject.toml - rm -rf ./crates/infisical-py/infisical_client/__init__.py - - - name: Download Cargo.toml artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: Cargo.toml - path: ./crates/infisical-py/ - - name: Download pyproject.toml artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: pyproject.toml - path: ./crates/infisical-py/ - - - name: Download __init__.py artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: __init__.py - path: ./crates/infisical-py/infisical_client/ - - - name: Retrieve Type Definitions - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: schemas.py - path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ - - #sudo apt install libssl-dev - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y libssl-dev - sudo apt-get install -y pkg-config - - - name: Build wheels - uses: PyO3/maturin-action@v1 - env: - # Make psm compile, see https://github.com/rust-lang/stacker/issues/79 - CFLAGS_s390x_unknown_linux_gnu: "-march=z10" - # Workaround ring 0.17 build issue - CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8" - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter --verbose --manifest-path ./crates/infisical-py/Cargo.toml - sccache: "true" - manylinux: auto - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - windows: - runs-on: windows-latest - needs: - - bump-version - - generate_schemas - - sdist - strategy: - matrix: - target: [x64, x86] - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Delete existing version files - run: | - del ./crates/infisical-py/Cargo.toml - del ./crates/infisical-py/pyproject.toml - del ./crates/infisical-py/infisical_client/__init__.py - - name: Download Cargo.toml artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: Cargo.toml - path: ./crates/infisical-py/ - - name: Download pyproject.toml artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: pyproject.toml - path: ./crates/infisical-py/ - - - name: Download __init__.py artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: __init__.py - path: ./crates/infisical-py/infisical_client/ - - - name: Retrieve Type Definitions - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: schemas.py - path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ - - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - architecture: ${{ matrix.target }} - - - uses: dtolnay/rust-toolchain@stable - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --verbose --manifest-path ./crates/infisical-py/Cargo.toml - sccache: "true" - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - macos: - runs-on: macos-latest - needs: - - bump-version - - generate_schemas - - sdist - strategy: - matrix: - target: [aarch64, x86_64] + publish: + name: Publish + runs-on: ubuntu-22.04 + needs: setup steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Delete existing version files - run: | - rm -rf ./crates/infisical-py/Cargo.toml - rm -rf ./crates/infisical-py/pyproject.toml - rm -rf ./crates/infisical-py/infisical_client/__init__.py - - - name: Download Cargo.toml artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + - name: Install Python + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: - name: Cargo.toml - path: ./crates/infisical-py/ - - name: Download pyproject.toml artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: pyproject.toml - path: ./crates/infisical-py/ + python-version: "3.9" - - name: Download __init__.py artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: __init__.py - path: ./crates/infisical-py/infisical_client/ + - name: Install twine + run: pip install twine - - name: Retrieve Type Definitions - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + - name: Download artifacts + uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0 with: - name: schemas.py - path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ + workflow: build-python.yml + path: ${{ github.workspace }}/target/wheels/dist + workflow_conclusion: success + name: infisical_python(.*) + name_is_regexp: true - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - uses: dtolnay/rust-toolchain@stable - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --verbose --manifest-path ./crates/infisical-py/Cargo.toml - sccache: "true" - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - sdist: - runs-on: ubuntu-latest - needs: - - bump-version - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ref: ${{ github.head_ref }} - - - name: Delete existing version files + - name: Move files + working-directory: ${{ github.workspace }}/target/wheels/dist run: | - rm -rf ./crates/infisical-py/Cargo.toml - rm -rf ./crates/infisical-py/pyproject.toml - rm -rf ./crates/infisical-py/infisical_client/__init__.py - - - name: Download Cargo.toml artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: Cargo.toml - path: ./crates/infisical-py/ - - name: Download pyproject.toml artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: pyproject.toml - path: ./crates/infisical-py/ + find . -maxdepth 2 -type f -print0 | xargs -0 mv -t . + rm -rf */ - - name: Download __init__.py artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: __init__.py - path: ./crates/infisical-py/infisical_client/ - - - name: Retrieve Type Definitions - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: schemas.py - path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ + - name: Check + working-directory: ${{ github.workspace }}/target/wheels + run: twine check dist/* - - name: Build sdist - uses: PyO3/maturin-action@v1 - with: - command: sdist - args: --out dist --manifest-path ./crates/infisical-py/Cargo.toml - - name: Upload sdist - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - release: - name: Release - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') - # linux, windows - needs: [sdist, macos, linux, windows] - steps: - - uses: actions/download-artifact@v3 - with: - name: wheels - - name: Publish to PyPI - uses: PyO3/maturin-action@v1 + - name: Publish (DRY RUN ENABLED!) + working-directory: ${{ github.workspace }}/target/wheels env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - with: - command: upload - args: --skip-existing * + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: twine upload --repository testpypi dist/* From a7bf95e076ead8b2538a7d07397a38d6fcb7f2cb Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:21:59 +0400 Subject: [PATCH 02/18] Update release-python.yml --- .github/workflows/release-python.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 94e7b61..9202ad7 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -7,6 +7,9 @@ on: - "python-test" jobs: + build-python: + uses: ./.github/workflows/build-python.yml + setup: name: Setup runs-on: ubuntu-22.04 @@ -17,7 +20,7 @@ jobs: publish: name: Publish runs-on: ubuntu-22.04 - needs: setup + needs: [build-python, setup] steps: - name: Install Python uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 From c1534bb2194720d40b1fad85ad83d45449bca338 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:29:48 +0400 Subject: [PATCH 03/18] Update release-python.yml --- .github/workflows/release-python.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 9202ad7..b0872d1 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -11,6 +11,8 @@ jobs: uses: ./.github/workflows/build-python.yml setup: + needs: + - build-python name: Setup runs-on: ubuntu-22.04 steps: @@ -20,7 +22,8 @@ jobs: publish: name: Publish runs-on: ubuntu-22.04 - needs: [build-python, setup] + needs: + - setup steps: - name: Install Python uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 From e99258ae1b28d723cddc9b8f959a158c3687da95 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:33:39 +0400 Subject: [PATCH 04/18] Update build-python.yml --- .github/workflows/build-python.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index fcf6aa7..43bee2e 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -3,6 +3,7 @@ name: Build Python on: workflow_call: + workflow_dispatch: jobs: generate_schemas: @@ -14,7 +15,7 @@ jobs: - generate_schemas # - test-rust-crate runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') + #if: startsWith(github.ref, 'refs/tags/') steps: - name: Checkout uses: actions/checkout@v3 From 948a0004fab7d93b55dd39f3c4751f30eb488dfe Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:37:04 +0400 Subject: [PATCH 05/18] for testing --- .github/workflows/build-python.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index 43bee2e..e94ef2c 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -15,7 +15,7 @@ jobs: - generate_schemas # - test-rust-crate runs-on: ubuntu-latest - #if: startsWith(github.ref, 'refs/tags/') + # if: startsWith(github.ref, 'refs/tags/') steps: - name: Checkout uses: actions/checkout@v3 @@ -29,11 +29,11 @@ jobs: python-version: "3.10" - name: Bump versions (pyproject.toml / Cargo.toml) - run: | + run: | # poetry version ${{ github.ref_name }} cd ./crates/infisical-py pip install poetry poetry self add poetry-bumpversion - poetry version ${{ github.ref_name }} + poetry version 2.1.8 cd ../.. - name: Upload Cargo.toml artifact @@ -68,7 +68,8 @@ jobs: - bump-version - setup env: - _PACKAGE_VERSION: ${{ github.ref_name }} + #_PACKAGE_VERSION: ${{ github.ref_name }} + _PACKAGE_VERSION: "2.1.8" strategy: fail-fast: false matrix: From 61bfd5b3f45e09264898c8490902d8ed579337f3 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:01:32 +0400 Subject: [PATCH 06/18] Update build-python.yml --- .github/workflows/build-python.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index e94ef2c..aa3ca1b 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -116,11 +116,18 @@ jobs: # # - - name: Delete existing version files + - name: Delete existing version files (Linux/MacOS) + if: ${{ matrix.settings.os != 'windows-2022' }} run: | rm -rf ./crates/infisical-py/Cargo.toml rm -rf ./crates/infisical-py/pyproject.toml rm -rf ./crates/infisical-py/infisical_client/__init__.py + - name: Delete existing version files (Windows) + if: ${{ matrix.settings.os == 'windows-2022' }} + run: | + del /f /q .\crates\infisical-py\Cargo.toml + del /f /q .\crates\infisical-py\pyproject.toml + del /f /q .\crates\infisical-py\infisical_client\__init__.py - name: Download Cargo.toml artifact uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 From 82e0f142752e75d14459baf893e8e802e9f7f6b6 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:13:47 +0400 Subject: [PATCH 07/18] Update build-python.yml --- .github/workflows/build-python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index aa3ca1b..e049d9f 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -125,9 +125,9 @@ jobs: - name: Delete existing version files (Windows) if: ${{ matrix.settings.os == 'windows-2022' }} run: | - del /f /q .\crates\infisical-py\Cargo.toml - del /f /q .\crates\infisical-py\pyproject.toml - del /f /q .\crates\infisical-py\infisical_client\__init__.py + del /s /q .\crates\infisical-py\Cargo.toml + del /s /q .\crates\infisical-py\pyproject.toml + del /s /q .\crates\infisical-py\infisical_client\__init__.py - name: Download Cargo.toml artifact uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 From 5c4e1a03e7b393d6ab9c83095a810f70f2aca26b Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:21:43 +0400 Subject: [PATCH 08/18] Update build-python.yml --- .github/workflows/build-python.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index e049d9f..9b9a839 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -125,9 +125,11 @@ jobs: - name: Delete existing version files (Windows) if: ${{ matrix.settings.os == 'windows-2022' }} run: | + shell: cmd del /s /q .\crates\infisical-py\Cargo.toml del /s /q .\crates\infisical-py\pyproject.toml del /s /q .\crates\infisical-py\infisical_client\__init__.py + shell: cmd - name: Download Cargo.toml artifact uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 From 5ae212b474338de9ee0d6816080e7a96f428ddc3 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:28:13 +0400 Subject: [PATCH 09/18] Update build-python.yml --- .github/workflows/build-python.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index 9b9a839..2c31a93 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -125,11 +125,9 @@ jobs: - name: Delete existing version files (Windows) if: ${{ matrix.settings.os == 'windows-2022' }} run: | - shell: cmd - del /s /q .\crates\infisical-py\Cargo.toml - del /s /q .\crates\infisical-py\pyproject.toml - del /s /q .\crates\infisical-py\infisical_client\__init__.py - shell: cmd + del .\crates\infisical-py\Cargo.toml + del .\crates\infisical-py\pyproject.toml + del .\crates\infisical-py\infisical_client\__init__.py - name: Download Cargo.toml artifact uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 From 0b085f8a9bb6182f25a5d809dc0097e37d767734 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:46:32 +0400 Subject: [PATCH 10/18] Update release-python.yml --- .github/workflows/release-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index b0872d1..70efaa2 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -36,7 +36,7 @@ jobs: - name: Download artifacts uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0 with: - workflow: build-python.yml + # workflow: build-python.yml path: ${{ github.workspace }}/target/wheels/dist workflow_conclusion: success name: infisical_python(.*) From a18c8eb9d87e45e917d665809ec5b5b99f96cba2 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:58:03 +0400 Subject: [PATCH 11/18] Update release-python.yml --- .github/workflows/release-python.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 70efaa2..ac596e8 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -36,9 +36,9 @@ jobs: - name: Download artifacts uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0 with: - # workflow: build-python.yml + workflow: build-python.yml path: ${{ github.workspace }}/target/wheels/dist - workflow_conclusion: success + # workflow_conclusion: success name: infisical_python(.*) name_is_regexp: true From 667f3ae2c6e6b852787704982d28726f0549d8ac Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 23:13:16 +0400 Subject: [PATCH 12/18] Update release-python.yml --- .github/workflows/release-python.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index ac596e8..1727f68 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -38,7 +38,8 @@ jobs: with: workflow: build-python.yml path: ${{ github.workspace }}/target/wheels/dist - # workflow_conclusion: success + workflow_conclusion: success + branch: python-test # CHANGE TO 'main' WHEN READY! name: infisical_python(.*) name_is_regexp: true From 3b4600c971925e9164fe55dd9069c4693f1c1b95 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 1 Feb 2024 23:49:59 +0400 Subject: [PATCH 13/18] Update release-python.yml --- .github/workflows/release-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 1727f68..8048c97 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -38,7 +38,7 @@ jobs: with: workflow: build-python.yml path: ${{ github.workspace }}/target/wheels/dist - workflow_conclusion: success + # workflow_conclusion: success branch: python-test # CHANGE TO 'main' WHEN READY! name: infisical_python(.*) name_is_regexp: true From 52312e9c429e8f7b1b0cab7df0160197a13c6600 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Fri, 2 Feb 2024 00:15:45 +0400 Subject: [PATCH 14/18] Update release-python.yml --- .github/workflows/release-python.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 8048c97..f7de7f2 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -34,14 +34,16 @@ jobs: run: pip install twine - name: Download artifacts - uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0 + uses: actions/download-artifact@v4 with: - workflow: build-python.yml path: ${{ github.workspace }}/target/wheels/dist - # workflow_conclusion: success - branch: python-test # CHANGE TO 'main' WHEN READY! - name: infisical_python(.*) - name_is_regexp: true + name: infisical_python-*-* + + - name: Download sdist + uses: actions/download-artifact@v4 + with: + path: ${{ github.workspace }}/target/wheels/dist + name: infisical_python-*-sdist - name: Move files working-directory: ${{ github.workspace }}/target/wheels/dist From 3926085726289196fd200348de09d50412637d80 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Fri, 2 Feb 2024 00:37:38 +0400 Subject: [PATCH 15/18] Update release-python.yml --- .github/workflows/release-python.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index f7de7f2..bfb87be 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -37,13 +37,10 @@ jobs: uses: actions/download-artifact@v4 with: path: ${{ github.workspace }}/target/wheels/dist - name: infisical_python-*-* - - name: Download sdist - uses: actions/download-artifact@v4 - with: - path: ${{ github.workspace }}/target/wheels/dist - name: infisical_python-*-sdist + - name: List packages + run: ls -R ./target/wheels/dist + shell: bash - name: Move files working-directory: ${{ github.workspace }}/target/wheels/dist From 9d04310e727943b6969e85a41c4afcb810e22d32 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Fri, 2 Feb 2024 01:05:25 +0400 Subject: [PATCH 16/18] Update release-python.yml --- .github/workflows/release-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index bfb87be..bdb5f12 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -56,5 +56,5 @@ jobs: working-directory: ${{ github.workspace }}/target/wheels env: TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }} run: twine upload --repository testpypi dist/* From 384caaf32d541af9a765ab9bb5afeb66011cb173 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Fri, 2 Feb 2024 01:43:00 +0400 Subject: [PATCH 17/18] Final --- .github/workflows/build-python.yml | 30 ++++++++++------------------ .github/workflows/release-python.yml | 8 ++++---- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index 2c31a93..aa5410d 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -9,11 +9,14 @@ jobs: generate_schemas: uses: ./.github/workflows/generate-schemas.yml + test-rust-crate: + uses: ./.github/workflows/rust-test.yml + bump-version: name: Version changes needs: - generate_schemas - # - test-rust-crate + - test-rust-crate runs-on: ubuntu-latest # if: startsWith(github.ref, 'refs/tags/') steps: @@ -33,7 +36,7 @@ jobs: cd ./crates/infisical-py pip install poetry poetry self add poetry-bumpversion - poetry version 2.1.8 + poetry version ${{ github.ref_name }} cd ../.. - name: Upload Cargo.toml artifact @@ -68,8 +71,8 @@ jobs: - bump-version - setup env: - #_PACKAGE_VERSION: ${{ github.ref_name }} - _PACKAGE_VERSION: "2.1.8" + _PACKAGE_VERSION: ${{ github.ref_name }} + # _PACKAGE_VERSION: "2.1.8" strategy: fail-fast: false matrix: @@ -109,12 +112,7 @@ jobs: with: key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }} - # - # - # - # - # - # + # Deleting old files that contain versioning info, and replacing them with our modified artifacts. - name: Delete existing version files (Linux/MacOS) if: ${{ matrix.settings.os != 'windows-2022' }} @@ -146,22 +144,14 @@ jobs: name: __init__.py path: ./crates/infisical-py/infisical_client/ + # End of file replacement + - name: Retrieve Type Definitions uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: name: schemas.py path: ${{ github.workspace }}/crates/infisical-py/infisical_client/ - # - # - # - # - # - # - # - # - # - - name: Build wheels if: ${{ matrix.settings.target != 'x86_64-unknown-linux-gnu' }} uses: PyO3/maturin-action@a3013db91b2ef2e51420cfe99ee619c8e72a17e6 # v1.40.8 diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index bdb5f12..4bc2275 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -3,8 +3,8 @@ name: Publish Python SDK on: push: - branches: - - "python-test" + tags: + - "*.*.*" # version, e.g. 1.0.0 jobs: build-python: @@ -56,5 +56,5 @@ jobs: working-directory: ${{ github.workspace }}/target/wheels env: TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }} - run: twine upload --repository testpypi dist/* + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: twine upload --repository pypi dist/* From e32d733a18c499274c981fc51d66bc0159afa594 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Fri, 2 Feb 2024 01:43:22 +0400 Subject: [PATCH 18/18] Update release-python.yml --- .github/workflows/release-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 4bc2275..bbd5138 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -52,7 +52,7 @@ jobs: working-directory: ${{ github.workspace }}/target/wheels run: twine check dist/* - - name: Publish (DRY RUN ENABLED!) + - name: Publish working-directory: ${{ github.workspace }}/target/wheels env: TWINE_USERNAME: __token__