Skip to content

[NEWS.md] Minor fix #158

[NEWS.md] Minor fix

[NEWS.md] Minor fix #158

Workflow file for this run

name: Build Python Wheels
on:
push:
tags:
- '\d+\.\d+\.[0-9a-z]+'
workflow_dispatch:
inputs:
reason:
description: 'Reason for running workflow'
required: true
jobs:
build_wheels:
name: Build Py3 Wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Log reason (manual run only)
if: github.event_name == 'workflow_dispatch'
run: |
echo "Reason for triggering: ${{ github.event.inputs.reason }}"
- name: Check out
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
fetch-depth: 0 # unshallow fetch for setuptools-scm
- name: Install Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Build wheel (only macosx_universal2)
if: matrix.os == 'macos-latest'
uses: pypa/cibuildwheel@v2.16.1
with:
output-dir: dist
env:
CIBW_BUILD: "cp39-*"
CIBW_ARCHS_MACOS: universal2
CIBW_ENVIRONMENT_MACOS: "CFLAGS='-arch arm64 -arch x86_64 -I/usr/include/libxml2' CXXFLAGS='-arch arm64 -arch x86_64' LDFLAGS='-arch arm64 -arch x86_64'"
- name: Build wheel (except macosx_universal2)
uses: pypa/cibuildwheel@v2.16.1
with:
output-dir: dist
env:
CIBW_BUILD: "cp39-*"
CIBW_ARCHS_MACOS: x86_64
CIBW_ARCHS_WINDOWS: AMD64
CIBW_ARCHS_LINUX: x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_SKIP: "*musllinux*"
# CIBW_BEFORE_ALL_LINUX: "yum install -y libuuid-devel && yum install -y libxml2-devel"
# CIBW_ENVIRONMENT_LINUX: "CFLAGS='-I/usr/include/libxml2'"
CIBW_BEFORE_ALL_LINUX: "yum install -y libuuid-devel"
CIBW_ENVIRONMENT: "FORCE_BUILD_LIBXML2=ON"
- name: Build sdist (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
python -m pip install --upgrade pip
python -m pip install build>=0.7.0
python -m build --sdist
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: wheelstorage
path: ./dist/*
if-no-files-found: error
retention-days: 30
publish_release:
name: Publish Release
needs: build_wheels
runs-on: ubuntu-latest
steps:
- name: Get date & flat tag
id: date_tag
run: |
export DATE=$(TZ=US/Pacific date +'%Y-%m-%d')
echo $DATE
export FLAT_TAG=$(echo ${GITHUB_REF##*/} | sed 's/\.//g')
echo $FLAT_TAG
echo ::set-output name=TODAY::$DATE
echo ::set-output name=VERSION::$FLAT_TAG
shell: bash
- name: Download release assets
uses: actions/download-artifact@v3
with:
name: wheelstorage
path: dist
- name: Publish dist(s) to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: '[Release Notes](https://github.com/adobe-type-tools/afdko/blob/develop/NEWS.md#${{ steps.date_tag.outputs.VERSION }}-released-${{ steps.date_tag.outputs.TODAY }})'
prerelease: true
files: ./dist/*