Skip to content

SyftBox PyPI Release #17

SyftBox PyPI Release

SyftBox PyPI Release #17

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
skip_tests:
description: "If true, skip pre-release tests"
required: false
default: "false"
type: choice
options:
- "false"
- "true"
# Prevents concurrent runs of the same workflow
# while the previous run is still in progress
concurrency:
group: "CD - SyftBox"
cancel-in-progress: false
jobs:
call-pr-tests:
if: ${{ inputs.skip_tests == 'false' }}
uses: ./.github/workflows/pr-tests.yaml
deploy-syftbox:
needs: [call-pr-tests]
# runs-on: ubuntu-latest
runs-on: syftbox-sh-linux-x64
steps:
- name: Install Git
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install git -y
- 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