Skip to content

Merge pull request #1 from Hizuru3/dev #6

Merge pull request #1 from Hizuru3/dev

Merge pull request #1 from Hizuru3/dev #6

Workflow file for this run

name: Upload Habachen
on:
push:
tags:
- '*'
jobs:
update_and_build_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Update Version
run: |
python version_stmt.py ${{ github.ref_name }} > ./habachen/_version.py
git config --global user.name "${{ secrets.MY_USERNAME }}"
git config --global user.email "${{ secrets.MY_EMAIL }}"
git add .
git commit -m "updated to ${{ github.ref_name }}"
git push origin HEAD:main
- name: Build sdist
run: |
pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
build_wheels:
needs: update_and_build_sdist
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: Build wheels on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Turnout
run: |
git rm -f pyproject.toml
- name: Build
uses: pypa/[email protected]
env:
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
CIBW_ARCHS_LINUX: auto
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_wheels_extra:
needs: update_and_build_sdist
runs-on: ubuntu-latest
name: Build wheels for Linux arm64
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Turnout
run: |
git rm -f pyproject.toml
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Build
uses: pypa/[email protected]
env:
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
upload_pypi:
needs: [update_and_build_sdist, build_wheels, build_wheels_extra]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Upload package
run: |
twine upload --repository pypi -u ${{ secrets.TOK_USERNAME }} -p ${{ secrets.TOK_PASSWORD }} dist/*