Skip to content

SyftBox PyPI Release #7

SyftBox PyPI Release

SyftBox PyPI Release #7

Workflow file for this run

name: CD - SyftBox
on:
workflow_dispatch:
inputs:
bump_type:
description: "Version bump type"
type: choice
default: patch
options:
- patch
- minor
- major
test_bump:
description: "Perform a test bump version without pushing to pypi and repo"
type: boolean
default: false
# Prevents concurrent runs of the same workflow
# while the previous run is still in progress
concurrency:
group: "CD - SyftBox"
cancel-in-progress: false
jobs:
deploy-syftbox:
runs-on: ubuntu-latest
steps:
- name: Checkout SyftBox repo with github token
uses: actions/checkout@v4
with:
token: ${{ secrets.SYFTBOX_BOT_COMMIT_TOKEN }}
- name: Configure git user
run: |
git config user.name "${{ secrets.OM_BOT_NAME }}"
git config user.email "${{ secrets.OM_BOT_EMAIL }}"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install uv==0.4.19 twine
uv --version
- name: Install Just
uses: extractions/setup-just@v2
with:
just-version: "1.36.0"
- name: Bump the Version
run: |
just bump-version ${{ inputs.bump_type }}
- name: Build syftbox
run: |
just build
- name: Push to pypi
if: ${{ inputs.test_bump == false }}
run: |
twine upload -u __token__ -p ${{ secrets.OM_SYFTBOX_PYPI_TOKEN }} dist/*
- name: Push changes to SyftBox repo
if: ${{ inputs.test_bump == false }}
run: |
git push origin main