Skip to content

Deployment Pipeline

Deployment Pipeline #2

Workflow file for this run

name: Deployment Pipeline
on:
workflow_dispatch:
jobs:
integration:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Test BioCompose
run: |
pytest tests/main.py
deployment:
runs-on: ubuntu-latest
needs: integration
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "export PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
source $GITHUB_ENV
- name: Install dependencies
run: |
poetry install
- name: Extract project version
run: |
VERSION=$(poetry run python -c "import toml; print(toml.load('pyproject.toml')['tool']['poetry']['version'])")
echo "VERSION=$VERSION" >> $GITHUB_ENV
# - name: Build Documentation
# run: |
# make -C documentation clean
# make -C documentation html
# - name: Create new github tags
# run: |
# git tag -m "Version v${{ env.VERSION }}" "v${{ env.VERSION }}"
# git push --tags
- name: Publish new version on PyPI
run: |
poetry build
sudo rm -rf bio_compose/__pycache__
poetry publish --username __token__ --password ${{ secrets.ADMIN_PYPI_TOKEN }}
- name: Notify Deployment
run: echo "Version ${{ env.VERSION }} as been published on PyPI with release ${{ github.ref }}"