Skip to content

Fix solution ttt-ppp0101.py #270

Fix solution ttt-ppp0101.py

Fix solution ttt-ppp0101.py #270

Workflow file for this run

name: Wheel building and publishing
on: [push, pull_request, workflow_dispatch] # TODO: update this later
jobs:
build_wheel:
# This does the actual wheel building or if triggered manually via the workflow dispatch, or for a tag.
# this job does NOT publish the wheel
name: Build wheel on ubuntu-latest
runs-on: ubuntu-latest
#if: github.event_name == 'workflow_dispatch'
if: (github.repository == 'gumyr/build123d' && ( startsWith(github.ref, 'refs/tags/v'))) || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # get all history for setuptools_scm
- name: Build wheel
shell: bash
run: |
pwd
ls -lR
python3 -m pip install --upgrade pip
python3 -m pip -V
python3 -m pip wheel -w wheelhouse .
python3 -m pip freeze
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/build123d*.whl # only store the build123d wheel
# Do we need sdist wheel?
# build_sdist:
# name: Build source distribution
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build sdist
# run: pipx run build --sdist
# - uses: actions/upload-artifact@v3
# with:
# path: dist/*.tar.gz
upload_pypi:
needs: [build_wheel] #, build_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/build123d
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
if: needs.build_wheel.result == 'success'
#if: (github.repository == 'gumyr/build123d' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
# with: # for testing with test.pypi.org
# To test: repository-url: https://test.pypi.org/legacy/