Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds PyPI build and upload to deployment GH action #42

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Anaconda
name: Deployment

on:
push:
Expand Down Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: mamba-org/provision-with-micromamba@main
with:
environment-file: devtools/conda-envs/conda_build_env.yaml
environment-file: devtools/conda-envs/deployment_env.yaml
environment-name: test
channels: conda-forge
extra-specs: |
Expand All @@ -43,7 +43,7 @@ jobs:
working-directory: ./devtools/conda-recipes/anaconda
run: |
export CVPACK_VERSION=${{ github.ref_name }}
echo "::group::Building cvpack $CVPACK_VERSION"
echo "::group::Building conda package for cvpack $CVPACK_VERSION"
outdir=$(mktemp -d)
conda mambabuild . --no-anaconda-upload -c conda-forge --output-folder $outdir
echo "::endgroup::"
Expand All @@ -52,3 +52,12 @@ jobs:
export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }}
anaconda upload --user mdtools --force --label main $PACKAGE
echo "::endgroup::"

- name: PyPI Build and Upload
shell: bash -l {0}
run: |
export CVPACK_VERSION=${{ github.ref_name }}
echo "::group::Building PyPI distribution for cvpack $CVPACK_VERSION"
python -m build
python -m twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} --repository pypi dist/*
echo "::endgroup::"
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@ name: build
channels:
- conda-forge
dependencies:
# Base depends
# Base dependencies
- python
- pip
- numpy
- openmm
- pyyaml
- xmltodict

# Conda build
# Conda build
- anaconda-client
- conda-build
- boa

# PyPI build
- pip:
- build
- twine
Loading