Skip to content

Commit

Permalink
Merge pull request #16 from MannLabs/release-1.1.0
Browse files Browse the repository at this point in the history
add action
  • Loading branch information
GeorgWa authored Sep 10, 2024
2 parents c4b1099 + 1a98df5 commit 322dd9a
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish_on_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
workflow_dispatch:

name: Publish on PyPi

env:
PYTHON_VERSION: "3.9"

jobs:
Create_PyPi_Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ env.PYTHON_VERSION }}
- name: Conda info
shell: bash -le {0}
run: conda info
- name: Prepare distribution
shell: bash -le {0}
run: |
conda create -n pylmd_build python=${{ env.PYTHON_VERSION }} -y
conda activate pylmd_build
python -m pip install --upgrade pip
pip install build twine
rm -rf dist
rm -rf build
python -m build
twine check dist/*
conda deactivate
conda env remove --name pylmd_build -y
conda clean --all -y
- name: Publish distribution to Test-PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
- name: Test Test-PyPI loose installation
shell: bash -le {0}
run: |
conda create -n pip_loose_test python=${{ env.PYTHON_VERSION }} -y
conda activate pip_loose_test
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "py-lmd"
alphadia -v
conda deactivate
conda env remove --name pip_stable_test -y
conda clean --all -y

0 comments on commit 322dd9a

Please sign in to comment.