mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: Push Python Packages
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
internal_pypi:
|
|
description: 'Whether to push to internal pypi'
|
|
required: true
|
|
type: boolean
|
|
public_pypi:
|
|
description: 'Whether to push to public pypi'
|
|
default: 'false'
|
|
required: true
|
|
type: boolean
|
|
tag:
|
|
description: 'Release tag to push'
|
|
required: true
|
|
|
|
jobs:
|
|
PushPackages:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Download release assets
|
|
uses: duhow/download-github-release-assets@v1
|
|
with:
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
repository: ${{ github.repository }}
|
|
tag: ${{ github.event.inputs.tag }}
|
|
files: '*'
|
|
target: ${{ github.workspace }}/release/
|
|
|
|
- name: Install dependencies
|
|
if: ${{ github.event.inputs.internal_pypi || github.event.inputs.public_pypi }}
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install twine
|
|
|
|
- name: Push packages to internal pypi
|
|
if: ${{ github.event.inputs.internal_pypi }}
|
|
run: twine upload -u ${{ secrets.INTERNAL_PYPI_USER }} -p ${{ secrets.INTERNAL_PYPI_PASSWORD }} --repository-url ${{ secrets.INTERNAL_PYPI_URL }} ${{ github.workspace }}/release/*.whl
|
|
|
|
- name: Push packages to public pypi
|
|
if: ${{ github.event.inputs.public_pypi }}
|
|
run: twine upload -u ${{ secrets.PUBLIC_PYPI_USER }} -p ${{ secrets.PUBLIC_PYPI_PASSWORD }} -r pypi ${{ github.workspace }}/release/*.whl
|