Skip to content

build wheels for amd64 and arm64 #11

build wheels for amd64 and arm64

build wheels for amd64 and arm64 #11

Workflow file for this run

name: PyPI
on:
- push
jobs:
build-linux-amd64:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
- uses: RalfG/[email protected]
with:
python-versions: 'cp311-cp311 cp312-cp312'
- run: sudo find dist -name '*linux_x86_64.whl' -delete
- uses: actions/upload-artifact@v4
with:
name: dist-linux-amd64
path: dist
build-linux-aarch64:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
- uses: RalfG/[email protected]_aarch64
with:
python-versions: 'cp311-cp311 cp312-cp312'
- run: sudo find dist -name '*linux_aarch64.whl' -delete
- uses: actions/upload-artifact@v4
with:
name: dist-linux-aarch64
path: dist
test:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
needs:
- build-linux-amd64
- build-linux-aarch64
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/dispatch-functions
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist-*
- run: |
mkdir dist
mv dist-*/*.whl dist/
mv dist-linux-amd64/*.tar.gz dist/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
release:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs:
- build-linux-amd64
- build-linux-aarch64
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://pypi.org/p/dispatch-functions
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist-*
- run: |
mkdir dist
mv dist-*/*.whl dist/
mv dist-linux-amd64/*.tar.gz dist/
- uses: pypa/gh-action-pypi-publish@release/v1