mirror of
https://github.com/gumyr/build123d.git
synced 2026-01-14 05:12:09 -08:00
Create publish.yml
Initial nonworking draft of structure
This commit is contained in:
parent
b18af27e13
commit
7ee00e27ae
1 changed files with 80 additions and 0 deletions
80
.github/workflows/publish.yml
vendored
Normal file
80
.github/workflows/publish.yml
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
name: Wheel building and publishing
|
||||
|
||||
on:
|
||||
# schedule:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test_wheel_building:
|
||||
#
|
||||
permissions:
|
||||
contents: none
|
||||
uses: someactionyml.yml #TODO: replace with wheel build action
|
||||
if: (github.event_name == 'push') # || github.event_name == 'pull_request')
|
||||
with:
|
||||
upload_to_pypi: false
|
||||
targets: |
|
||||
- cp311-manylinux_x86_64
|
||||
|
||||
secrets:
|
||||
pypi_token: ${{ secrets.pypi_token }} # consider using alternate strategy
|
||||
|
||||
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 wheels
|
||||
permissions:
|
||||
contents: none
|
||||
uses: someactionyml.yml #TODO: replace with wheel build action
|
||||
if: (github.repository == 'gumyr/build123d' && ( startsWith(github.ref, 'refs/tags/v') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Build all wheels')))
|
||||
with:
|
||||
# We upload to PyPI for all tags starting with v but not ones ending in .dev
|
||||
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '.dev') && (github.event_name == 'push') }}
|
||||
# For nightly wheels as well as when building with the 'Build all wheels' label, we disable
|
||||
# the build isolation
|
||||
# the latest stable versions of all other build-time dependencies.
|
||||
env: |
|
||||
CIBW_BEFORE_BUILD: '${{ ((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Build all wheels')) && 'pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple') || '' }}'
|
||||
CIBW_BUILD_FRONTEND: '${{ ((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Build all wheels')) && 'pip; args: --no-build-isolation') || 'build' }}'
|
||||
targets: |
|
||||
# Linux wheels
|
||||
|
||||
- cp39-manylinux_x86_64
|
||||
- cp310-manylinux_x86_64
|
||||
- cp311-manylinux_x86_64
|
||||
#- cp312-manylinux_x86_64
|
||||
|
||||
# MacOS X wheels
|
||||
|
||||
- cp39*macosx_x86_64
|
||||
- cp310*macosx_x86_64
|
||||
- cp311*macosx_x86_64
|
||||
#- cp312*macosx_x86_64
|
||||
|
||||
- cp39*macosx_arm64
|
||||
- cp310*macosx_arm64
|
||||
- cp311*macosx_arm64
|
||||
#- cp312*macosx_arm64
|
||||
|
||||
# Windows wheels
|
||||
|
||||
- cp39*win_amd64
|
||||
- cp310*win_amd64
|
||||
- cp311*win_amd64
|
||||
#- cp312*win_amd64
|
||||
|
||||
pypi-publish:
|
||||
# this job publishes the wheels built above
|
||||
name: Upload release to PyPI
|
||||
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
|
||||
steps:
|
||||
# TODO: ? retrieve your distributions here
|
||||
|
||||
- name: Publish package distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
Loading…
Add table
Add a link
Reference in a new issue