8000 Merge pull request #1800 from stonebig/master · winpython/winpython@2504448 · GitHub
[go: up one dir, main page]

Skip to content

build_wppm_prod_publish #2

build_wppm_prod_publish

build_wppm_prod_publish #2

49D3
name: build_wppm_prod_publish
# 2025-08-16: from TornadoWeb simple example, and full bash
# object:
# - learn the matrix method
# - be compatible with cibuilds later
# - copy the methods the most widly used
#
# using a predefined hashed wheel environnment: pylock.wppmbuild.toml
# pip freeze>test.txt
# python -m pip lock --no-deps --find-links=C:\WinP\packages.srcreq -r test.txt -o pylock.wppmbuild.toml
# python -X utf8 -c "from wppm import wheelhouse as wh; wh.pylock_to_req('pylock.wppmbuild.toml', r'requir.wppmbuild.txt')"
#
on:
workflow_dispatch:
# Allow this workflow to be run manually (pushing to testpypi instead of pypi)
permissions: {}
env:
python-version: '3.13'
WINPYrequirements: './winpython/portable/cycle_2025_04/requir.wppmbuild.txt'
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ env.python-version }}
- name: Install dependencies to build with bash
shell: bash
run: |
python -m pip install --no-deps --require-hashes -r ${{ env.WINPYrequirements }}
- name: Build sdist
shell: bash
run: |
python -m flit build && ls -l dist
- name: prepare result
shell: bash
run: |
mkdir wheelhouse
cp dist/*.whl wheelhouse
- name: generate hashes wppm style
shell: bash
run: |
DESTFILE="./wheelhouse/hashes.md"
python -c "import sys;from wppm import hash; hash.print_hashes(sys.argv[1:])" wheelhouse/*.whl > $DESTFILE
cat $DESTFILE
- name: List wheelhouse contents (for debugging)
shell: bash
run: |
ls -1 wheelhouse
- uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.os }}
path: ./dist/wppm*.whl
retention-days: 88 # keeps artifact for 8 days
upload_pypi_test:
name: Upload to PyPI (prod)
needs: [build_wheels]
runs-on: ubuntu-24.04
permissions:
# This permission is required for pypi's "trusted publisher" feature
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: artifacts-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
verbose: true # Enable verbose output
0