Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 13 additions & 49 deletions .github/workflows/build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Build Wheel and Release

# Trigger on tag push or manual dispatch.
# Tag and release privilege are verified by the check-* jobs below.
# Tag and release privilege are verified inside the reusable workflow.
on:
workflow_dispatch:
push:
tags:
- "*"

# ── Release modality ──────────────────────────────────────────────────────────
# Three options are provided below. Only ONE option should be active at a time.
# To switch: comment out the active jobs and uncomment your preferred option,
# Three options are provided below. Only ONE job should be active at a time.
# To switch: comment out the active job and uncomment your preferred option,
# then commit the change to main before tagging a release.
# ─────────────────────────────────────────────────────────────────────────────

Expand All @@ -22,58 +22,22 @@ jobs:
# release body, and the Sphinx documentation is rebuilt and deployed to
# GitHub Pages.
#
# The wheels come from build-wheels.yml rather than the shared
# scikit-package workflow: they link Boost and GSL statically, so they
# work without a conda environment.
check-tag-privilege:
uses: scikit-package/release-scripts/.github/workflows/_check-tag-privilege.yml@v0
# build_c_ext_with_cibw builds the wheels with cibuildwheel using
# [tool.cibuildwheel] in pyproject.toml.
# TODO: switch to scikit-package/release-scripts@v0 once the cibw
# branch is merged and released there.
build-release:
uses: SYMSCAE/release-scripts/.github/workflows/_build-wheel-release-upload.yml@cibw
with:
project: diffpy.srreal
submodules: recursive
c_extension: true
build_c_ext_with_cibw: true
maintainer_github_username: sbillinge

check-pat-token-validity:
uses: scikit-package/release-scripts/.github/workflows/_check-pat-token-validity.yml@v0
secrets:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

check-pypi-token-validity:
uses: scikit-package/release-scripts/.github/workflows/_check-pypi-token-validity.yml@v0
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

get-python-version:
needs:
[check-tag-privilege, check-pat-token-validity, check-pypi-token-validity]
uses: scikit-package/release-scripts/.github/workflows/_get-python-version-latest.yml@v0

build-wheels:
needs:
[check-tag-privilege, check-pat-token-validity, check-pypi-token-validity]
uses: ./.github/workflows/build-wheels.yml

release-github:
needs: [build-wheels]
uses: scikit-package/release-scripts/.github/workflows/_release-github.yml@v0
secrets:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

# Uploads every artifact of this run: the sdist and all wheels.
release-pypi:
needs: [release-github, get-python-version]
uses: scikit-package/release-scripts/.github/workflows/_release-pypi.yml@v0
with:
python_version: ${{ fromJSON(needs.get-python-version.outputs.latest_python_version) }}
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

docs-release:
needs: [release-github, get-python-version]
uses: scikit-package/release-scripts/.github/workflows/_release-docs.yml@v0
with:
submodules: recursive
project: diffpy.srreal
c_extension: true
python_version: ${{ fromJSON(needs.get-python-version.outputs.latest_python_version) }}

# Option 2: Release to GitHub and deploy docs, without publishing to PyPI.
#
# A GitHub release is created and the Sphinx docs are deployed, but the
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/build-wheels.yml

This file was deleted.

23 changes: 23 additions & 0 deletions news/shared-cibuildwheel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Switched to shared wheel workflow.

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
Loading