0.1.0 release bits #166
Workflow file for this run
This file contains hidden or 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
name: CD | |
on: | |
merge_group: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
release: | |
types: [published] | |
jobs: | |
packaging: | |
if: github.repository_owner == 'sgkit-dev' | |
name: Packaging | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip build validate-pyproject[all] | |
python -m build --sdist | |
- name: Upload sdist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sdist | |
path: dist | |
- name: Build wheels | |
run: | | |
validate-pyproject pyproject.toml | |
docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash .github/workflows/docker/buildwheel.sh | |
- name: Check vcztools CLI | |
run: | | |
pip install numpy "zarr>=2.17,<3" "click>=8.2.0" "pyranges!=0.1.3" pyparsing | |
pip install vcztools --no-index --only-binary vcztools -f dist/wheelhouse | |
vcztools --help | |
# Make sure we don't have ``vcztools`` in the CWD | |
cd tests | |
python -m vcztools --help | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-wheels | |
path: dist/wheelhouse | |
publish-to-pypi: | |
if: github.repository_owner == 'sgkit-dev' && github.event_name == 'release' | |
needs: | |
- packaging | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/vcztools | |
permissions: | |
id-token: write # IMPORTANT: mandatory for trusted publishing | |
steps: | |
- name: Download all | |
uses: actions/download-artifact@v4.1.8 | |
- name: Move to dist | |
run: | | |
mkdir dist | |
cp */*.{whl,gz} dist/. | |
ls dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
publish-to-testpypi: | |
if: github.repository_owner == 'sgkit-dev' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
needs: | |
- packaging | |
runs-on: ubuntu-latest | |
environment: | |
name: testpypi | |
url: https://test.pypi.org/p/vcztools | |
permissions: | |
id-token: write # IMPORTANT: mandatory for trusted publishing | |
steps: | |
- name: Download all | |
uses: actions/download-artifact@v4.1.8 | |
- name: Move to dist | |
run: | | |
mkdir dist | |
cp */*.{whl,gz} dist/. | |
ls dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
verbose: true | |
repository-url: https://test.pypi.org/legacy/ |