Skip to content

[VAN-126384] Publishing administration package. #80

[VAN-126384] Publishing administration package.

[VAN-126384] Publishing administration package. #80

Workflow file for this run

name: Publish Python SDK to PyPI
on:
pull_request:
types:
- opened
- reopened
branches:
- main
- github-actions-test
workflow_dispatch:
branches:
- main
- github-actions-test
# Permissions to create PR, to write changes, to use PyPi auth
permissions:
pull-requests: write
contents: write
id-token: write
jobs:
publish_package:
if: startsWith(github.head_ref, 'release')
name: Publish Python SDK to PyPI
runs-on: ubuntu-latest
strategy:
matrix:
package_folder:
# - visier_api_core
- visier_api_administration
# - visier_api_analytic_model
# - visier_api_data_in
# - visier_api_data_out
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Build package
run: |
cd "src/${{ matrix.package_folder }}"
python -m build --outdir ./dist
- name: Publish PyPi package
uses: pypa/[email protected]
with:
packages-dir: "src/${{ matrix.package_folder }}/dist"
# merge_pr:
# needs: publish_package
# if: needs.publish_package.result == 'success'
# name: Merge PR
# runs-on: ubuntu-latest
# steps:
# - name: Check out before merge
# uses: actions/checkout@v4
#
# - name: Merge PR
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh pr merge ${{ github.event.pull_request.number }} --merge --delete-branch