Skip to content

Commit

Permalink
add PyPI publishing actions
Browse files Browse the repository at this point in the history
  • Loading branch information
KedoKudo committed Jul 3, 2024
1 parent 925df52 commit 156de15
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,28 @@ jobs:
if [ "${IS_RC}" = "true" ]; then CONDA_LABEL="rc"; fi
echo pushing ${{ github.ref }} with label $CONDA_LABEL
anaconda upload --label $CONDA_LABEL conda.recipe/noarch/bm3dornl*.tar.bz2
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge,defaults
mamba-version: "*"
environment-file: environment.yml
cache-environment-key: ${{ runner.os }}-env-${{ hashFiles('**/environment.yml') }}
cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/environment.yml') }}
- name: build pypi pacakge
run: |
# build the package
VERSION=$(versioningit .) python -m build
# retrieve your distributions here
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ dependencies = [
]
license = { text = "MIT" }
keywords = ["BM3D", "image processing", "neutron imaging", "denoising", "CuPy", "Numba"]
readme = "README.md"

[project.urls]
homepage = "https://github.com/neutrons/python_project_template/"
repository = "https://github.com/ornlneutronimaging/bm3dornl"
documentation = "https://bm3dornl.readthedocs.io/en/latest/"
issues = "https://github.com/ornlneutronimaging/bm3dornl/issues"


[build-system]
requires = [
"setuptools >= 40.6.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/bm3dornl-data
Submodule bm3dornl-data updated from 984b04 to 58e019

0 comments on commit 156de15

Please sign in to comment.