diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml new file mode 100755 index 00000000..0e47ef9b --- /dev/null +++ b/.github/workflows/pypi_publish.yml @@ -0,0 +1,49 @@ +name: Publish package python distribution to Pypi + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.12.7 + - name: Install pypi/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ + + publish-to-pypi: + name: Publish dist to PyPI + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/buisciii-tools + permissions: + id-token: write + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index b76da9b9..61cf8d30 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), Code contributions to the new version: +- [Pablo Mata](https://github.com/Shettland) + ### Template fixes and updates ### Modules #### Added enhancements +- Included a new github action to automatically publish releases to pypi [#351](https://github.com/BU-ISCIII/buisciii-tools/pull/351) + #### Fixes #### Changed diff --git a/README.md b/README.md index da5522a9..dddebc62 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ BU-ISCIII provides a serie or services in its portfolio for supporting bioinform ```bash micromamba create -n buisciii -f environment.yml micromamba activate buisciii -pip install --force-reinstall --upgrade git+https://github.com/bu-isciii/buisciii-tools.git@main +pip install buisciii-tools ``` or @@ -40,7 +40,7 @@ or git checkout main conda create -n buisciii -f environment.yml conda activate -pip install . +pip install buisciii-tools ``` ### Dev version