Skip to content

v2.7.0

v2.7.0 #65

Workflow file for this run

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
update:
name: Update docs
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
ref: main
- name: Install dependencies
run: |
conda create --name proteinflow -y python=3.9
conda run -n proteinflow python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
conda run -n proteinflow python -m pip install numpy
conda run -n proteinflow python -m pip install -e .
- name: Install pdoc3 and black
run: |
conda run -n proteinflow python -m pip install pdoc3 black
- name: Reformat the code
run: |
conda run -n proteinflow black .
- name: Update the docs
run: |
git pull origin main
conda run -n proteinflow . dev/make_docs.sh
echo ${{ needs.test.outputs.update }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: auto update
skip_checkout: true
conda:
name: Push to Anaconda
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniforge-variant: Mambaforge
channels: conda-forge
python-version: 3.9
use-mamba: true
- name: Install dependencies
run: |
mamba install -y boa -c conda-forge
mamba install -y anaconda-client
anaconda login --username ${{ secrets.CONDA_USERNAME }} --password ${{ secrets.CONDA_PASSWORD }}
- name: Build and upload the conda packages for linux-64 and osx-64
run: |
conda mambabuild --no-anaconda-upload .conda/default -c conda-forge -c bioconda --output-folder .
anaconda upload --force ./linux-64/*.tar.bz2
conda convert --platform osx-64 ./linux-64/*.tar.bz2
anaconda upload --force ./osx-64/*.tar.bz2
- name: Build and upload the conda packages for osx-arm64
run: |
conda mambabuild --no-anaconda-upload .conda/arm64 -c conda-forge -c bioconda --output-folder .
conda convert --platform osx-arm64 ./linux-64/*.tar.bz2
anaconda upload --force ./osx-arm64/*.tar.bz2
pypi_and_dockerhub:
runs-on: ubuntu-latest
name: Push to PyPI and DockerHub
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: adaptyvbio
password: ${{ secrets.DOCKER_PASS }}
- name: Build and push Docker image
run: |
docker build -t adaptyvbio/proteinflow:${{ github.event.release.tag_name }} .
docker image push adaptyvbio/proteinflow:${{ github.event.release.tag_name }}
docker tag adaptyvbio/proteinflow:${{ github.event.release.tag_name }} adaptyvbio/proteinflow:latest
docker image push adaptyvbio/proteinflow:latest
- name: Push README to Dockerhub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: adaptyvbio
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
with:
destination_container_repo: adaptyvbio/proteinflow
provider: dockerhub
short_description: 'Versatile pipeline for processing protein structure data for deep learning applications.'
readme_file: 'README.md'