Skip to content

Upload of packages to TestPyPI #11

Upload of packages to TestPyPI

Upload of packages to TestPyPI #11

Workflow file for this run

name: Upload of packages to TestPyPI
on:
workflow_dispatch:
branches:
- main
jobs:
dist:
name: Build distribution packages
strategy:
matrix:
os:
- ubuntu-24.04
# - ubuntu-24.04-arm <-- Error: PyPI does not accept 'aarch64'.
# - macos-15
- macos-15-intel
python-version:
- '3.11'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel build cython
- name: Build wheel and source tarball
run: |
python -m build
- name: Store distribution
uses: actions/upload-artifact@v6
with:
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
path: dist/
retention-days: 1
testpypi:
name: Publish test distribution
needs:
- dist
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/softfloatpy
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download distribution
uses: actions/download-artifact@v7
with:
pattern: python-*-package-for-*
path: dist/
merge-multiple: true
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/