Skip to content

changed ci

changed ci #2

name: Build and Deploy Packages

Check failure on line 1 in .github/workflows/build-and-deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-and-deploy.yml

Invalid workflow file

(Line: 97, Col: 26): Job 'deploy-to-pypi' depends on unknown job 'build-windows'.
on:
push:
tags:
- 'v[0-9]*'
- feature/ci_test
workflow_dispatch:
jobs:
build-linux:
name: Build Linux packages (manylinux)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Generate meson files
run: |
python3 scripts/generate_meson.py ./src/dbzero/ core
python3 scripts/generate_meson_tests.py tests/
- name: Configure git
run: |
git config --global user.email "ci@example.com"
git config --global user.name "CI Builder"
rm .gitignore
git add . && git commit -m "Update meson files for build"
- name: Install build dependencies
run: |
pip install build cibuildwheel
- name: Build wheels (manylinux)
run: python3 -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp${{ matrix.python-version }}-*
CIBW_SKIP: pp* *-musllinux*
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
- name: Upload Linux wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.python-version }}
path: wheelhouse/*.whl
build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Generate meson files
run: |
python3 scripts/generate_meson.py ./src/dbzero/ core
python3 scripts/generate_meson_tests.py tests/
- name: Configure git
run: |
git config --global user.email "ci@example.com"
git config --global user.name "CI Builder"
rm .gitignore
git add . && git commit -m "Update meson files for build"
- name: Install build dependencies
run: |
pip install build meson
- name: Build source distribution
run: python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
deploy-to-pypi:
name: Deploy to PyPI (Manual)
runs-on: ubuntu-latest
needs: [build-linux, build-windows, build-sdist]
if: github.event_name == 'workflow_dispatch'
environment: pypi-deployment
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ./dist/
- name: Flatten artifact structure
run: |
mkdir -p ./upload/
find ./dist/ -name "*.whl" -exec cp {} ./upload/ \;
find ./dist/ -name "*.tar.gz" -exec cp {} ./upload/ \;
ls -la ./upload/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: ${{ vars.REPO_URL }}
username: ${{ vars.USER }}
password: ${{ secrets.PASSWORD }}
packages-dir: ./upload/
verbose: true