Skip to content

move python req

move python req #49

Workflow file for this run

# Release new CLI version
# When a new release is made, this action will be run.
# The action builds the CLI and publishes to PyPi,
# and generates the executables for Windows, MacOS and Ubuntu.
# It also builds the documentation and generates a PDF version of it.
---
name: New Release
on:
push:
branches:
- "dds-1473-fix-client-documentation-github-actions"
release:
types: [published]
branches:
- "master"
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Check out source-code repository
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install .
- name: Build the distribution
run: python setup.py sdist bdist_wheel
# - name: Publish dist to TestPyPI
# if: github.repository == 'ScilifelabDataCentre/dds_cli'
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# print-hash: true
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository-url: https://test.pypi.org/legacy/
# skip-existing: true
# - name: Publish dist to PyPI
# if: github.repository == 'ScilifelabDataCentre/dds_cli'
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# print-hash: true
# user: __token__
# password: ${{ secrets.pypi_password }}
# skip-existing: true
ddsclidocumentation:
name: Build the DDS CLI Documentation
needs: build-n-publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Make dependencies available to Docker container
run: |
cat requirements.txt requirements-dev.txt > ./docs/requirements.txt
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y gcc
sudo apt-get install -y librsvg2-bin
pip install sphinxcontrib-svg2pdfconverter
- name: Build the HTML documentation
uses: matthiaszepper/sphinx-action-v4@latest
with:
container: latest
pre-build-command: "pip install ."
build-command: "make html"
docs-folder: "docs/"
- name: Build the pdf with Sphinx
uses: matthiaszepper/sphinx-action-v4@pdflatex
with:
container: pdflatex
build-command: "make latexpdf"
docs-folder: "docs/"
- name: Create an artifact of the previously built HTML
uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: docs/_build/html/
- name: Create an artifact of the previously built pdf
uses: actions/upload-artifact@v3
with:
name: Documentation
path: docs/_build/latex/datadeliverysystem.pdf
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: docs/_build/latex/datadeliverysystem.pdf
asset_name: dds_cli_user_manual.pdf
asset_content_type: application/pdf