-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (61 loc) · 1.73 KB
/
testpypi.yml
File metadata and controls
77 lines (61 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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/