Skip to content

Commit 010cbba

Browse files
committed
publish to prod
1 parent eeb171f commit 010cbba

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: build_wppm_test_publish
2+
# 2025-08-16: from TornadoWeb simple example, and full bash
3+
# object:
4+
# - learn the matrix method
5+
# - be compatible with cibuilds later
6+
# - copy the methods the most widly used
7+
#
8+
# using a predefined hashed wheel environnment: pylock.wppmbuild.toml
9+
# pip freeze>test.txt
10+
# python -m pip lock --no-deps --find-links=C:\WinP\packages.srcreq -r test.txt -o pylock.wppmbuild.toml
11+
# python -X utf8 -c "from wppm import wheelhouse as wh; wh.pylock_to_req('pylock.wppmbuild.toml', r'requir.wppmbuild.txt')"
12+
#
13+
on:
14+
workflow_dispatch:
15+
# Allow this workflow to be run manually (pushing to testpypi instead of pypi)
16+
permissions: {}
17+
18+
env:
19+
python-version: '3.13'
20+
WINPYrequirements: './winpython/portable/cycle_2025_04/requir.wppmbuild.txt'
21+
22+
jobs:
23+
build_wheels:
24+
name: Build wheels on ${{ matrix.os }}
25+
runs-on: ${{ matrix.os }}
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
os: [windows-latest]
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
persist-credentials: false
35+
36+
- uses: actions/setup-python@v5
37+
name: Install Python
38+
with:
39+
python-version: ${{ env.python-version }}
40+
41+
- name: Install dependencies to build with bash
42+
shell: bash
43+
run: |
44+
python -m pip install --no-deps --require-hashes -r ${{ env.WINPYrequirements }}
45+
46+
- name: Build sdist
47+
shell: bash
48+
run: |
49+
python -m flit build && ls -l dist
50+
51+
- name: prepare result
52+
shell: bash
53+
run: |
54+
mkdir wheelhouse
55+
cp dist/*.whl wheelhouse
56+
57+
- name: generate hashes wppm style
58+
shell: bash
59+
run: |
60+
DESTFILE="./wheelhouse/hashes.md"
61+
python -c "import sys;from wppm import hash; hash.print_hashes(sys.argv[1:])" wheelhouse/*.whl > $DESTFILE
62+
cat $DESTFILE
63+
64+
- name: List wheelhouse contents (for debugging)
65+
shell: bash
66+
run: |
67+
ls -1 wheelhouse
68+
69+
- uses: actions/upload-artifact@v4
70+
with:
71+
name: artifacts-${{ matrix.os }}
72+
path: ./dist/wppm*.whl
73+
retention-days: 88 # keeps artifact for 8 days
74+
75+
upload_pypi_test:
76+
name: Upload to PyPI (prod)
77+
needs: [build_wheels]
78+
runs-on: ubuntu-24.04
79+
permissions:
80+
# This permission is required for pypi's "trusted publisher" feature
81+
id-token: write
82+
steps:
83+
- uses: actions/download-artifact@v4
84+
with:
85+
pattern: artifacts-*
86+
path: dist
87+
merge-multiple: true
88+
89+
- uses: pypa/gh-action-pypi-publish@release/v1
90+
with:
91+
password: ${{ secrets.PYPI_API_TOKEN }}
92+
skip-existing: true
93+
verbose: true # Enable verbose output

0 commit comments

Comments
 (0)