-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from MannLabs/release-1.1.0
add action
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |