v0.125.0 #88
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- published | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: 3 | |
CIBW_BUILD_VERBOSITY: 2 | |
CIBW_BUILD_FRONTEND: "pip" # use pip for now, not build – missing buildDate otherwise | |
CIBW_BUILD: "cp312-*" | |
CIBW_SKIP: "pp* *musllinux*" | |
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28" | |
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28" | |
jobs: | |
sdist: | |
name: sdist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: 3.12 | |
- name: Build source distribution | |
run: | | |
git apply scripts/ci/tools/patches/0001-use-temporary-directory-to-store-eggs.patch | |
pipx run build --sdist --outdir dist/ | |
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: source_distribution | |
path: dist | |
if-no-files-found: error | |
windows_amd64_wheels: | |
name: amd64-windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: 3.12 | |
- name: Set up Go toolchain | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version: '1.22.2' | |
cache: false | |
- name: Install MinGW compiler(s) | |
run: choco install mingw | |
- uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0 | |
with: | |
package-dir: . | |
output-dir: wheelhouse | |
env: | |
CIBW_ARCHS_WINDOWS: AMD64 | |
CIBW_TEST_COMMAND: > | |
hugo version | |
hugo env --logLevel debug | |
- name: Upload wheels | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: wheels_windows_amd64 | |
path: ./wheelhouse/*.whl | |
if-no-files-found: error | |
linux_amd64_wheels: | |
name: amd64-linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: 3.12 | |
- uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0 | |
with: | |
package-dir: . | |
output-dir: wheelhouse | |
env: | |
CIBW_ARCHS_LINUX: x86_64 | |
CIBW_BEFORE_ALL_LINUX: bash scripts/ci/tools/linux/install_go.sh | |
CIBW_ENVIRONMENT_LINUX: PATH=$PATH:$HOME/go_installed/go/bin | |
CIBW_TEST_COMMAND: > | |
hugo version | |
hugo env --logLevel debug | |
- name: Upload wheels | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: wheels_linux_amd64 | |
path: ./wheelhouse/*.whl | |
if-no-files-found: error | |
linux_arm64_wheels: | |
name: arm64-linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: 3.12 | |
- name: Set up QEMU for emulation | |
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 | |
with: | |
platforms: all | |
- uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0 | |
with: | |
package-dir: . | |
output-dir: wheelhouse | |
env: | |
CIBW_ARCHS_LINUX: aarch64 | |
CIBW_BEFORE_ALL_LINUX: bash scripts/ci/tools/linux/install_go.sh | |
CIBW_ENVIRONMENT_LINUX: PATH=$PATH:$HOME/go_installed/go/bin | |
CIBW_TEST_COMMAND: > | |
hugo version | |
hugo env --logLevel debug | |
- name: Upload wheels | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: wheels_linux_aarch64 | |
path: ./wheelhouse/*.whl | |
if-no-files-found: error | |
macos_amd64_wheels: | |
name: amd64-macos | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: 3.12 | |
- name: Set up Go toolchain | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version: '1.22.2' | |
cache: false | |
check-latest: true | |
- uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0 | |
with: | |
package-dir: . | |
output-dir: wheelhouse | |
env: | |
CIBW_ARCHS_MACOS: x86_64 | |
CIBW_REPAIR_WHEEL_COMMAND_MACOS: '' | |
CIBW_TEST_COMMAND: > | |
hugo version | |
hugo env --logLevel debug | |
- name: Upload wheels | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: wheels_macos_x86_64 | |
path: ./wheelhouse/*.whl | |
if-no-files-found: error | |
macos_arm64_wheels: | |
name: arm64-macos | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: 3.12 | |
- name: Set up Go toolchain | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version: '1.22.2' | |
cache: false | |
check-latest: true | |
- uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0 | |
with: | |
package-dir: . | |
output-dir: wheelhouse | |
env: | |
CIBW_ARCHS_MACOS: arm64 | |
CIBW_REPAIR_WHEEL_COMMAND_MACOS: '' | |
CIBW_TEST_COMMAND: > | |
hugo version | |
hugo env --logLevel debug | |
- name: Upload wheels | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: wheels_macos_arm64 | |
path: ./wheelhouse/*.whl | |
if-no-files-found: error | |
publish: | |
needs: [ | |
sdist, | |
windows_amd64_wheels, | |
macos_amd64_wheels, | |
macos_arm64_wheels, | |
linux_amd64_wheels, | |
linux_arm64_wheels | |
] | |
name: Publish to PyPI or TestPyPI | |
environment: release | |
permissions: | |
# Required by OIDC to publish to PyPI and by Sigstore to sign artifacts | |
id-token: write | |
# Required to upload artifacts to a GitHub release identifier | |
contents: write | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- name: Download all artifacts | |
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | |
with: | |
path: upload/ | |
merge-multiple: true | |
- uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14 | |
if: github.event_name == 'release' && github.event.action == 'published' | |
with: | |
# Comment this line out to publish to PyPI | |
# repository-url: https://test.pypi.org/legacy/ | |
packages-dir: upload | |
- name: Sign artifacts with Sigstore | |
uses: sigstore/gh-action-sigstore-python@61f6a500bbfdd9a2a339cf033e5421951fbc1cd2 # v2.1.1 | |
with: | |
inputs: >- | |
./upload/*.whl | |
./upload/*.tar.gz | |
- name: Publish to GitHub Releases | |
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4 | |
if: github.event_name == 'release' && github.event.action == 'published' | |
with: | |
# This will contain not only the wheel and sdist, but also the signature files | |
# generated by the Sigstore action | |
files: upload/* |