Skip to content

cas-linkml v0.0.5

cas-linkml v0.0.5 #6

Workflow file for this run

---
name: Publish Python Package
on:
release:
types: [created]
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Poetry
run: |
pipx install poetry
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Install dependencies
run: poetry install --no-interaction
- name: Set PYTHONPATH
run: |
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src" >> $GITHUB_ENV
- name: Generate merged and expanded schemas
run: |
make expanded_schemas
- name: Package release assets
run: |
mkdir -p src/cell_annotation_schema/schemas
touch src/cell_annotation_schema/schemas/__init__.py
cp build/general_schema.yaml src/cell_annotation_schema/schemas
cp build/BICAN_schema.yaml src/cell_annotation_schema/schemas
cp build/CAP_schema.yaml src/cell_annotation_schema/schemas
# - name: Build source and wheel archives
# run: poetry build
#
# - name: Publish Package
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish distribution to PyPI
run: |
poetry config repositories.pypi https://pypi.org/legacy/
poetry version ${{ github.ref_name }}
poetry publish --build -r pypi -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}