Skip to content

Build

Build #2

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
publishReleases:
description: 'Publish to Releases'
required: false
default: 'true'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ 'macos-latest' ]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
runs-on: ${{ matrix.os }}
name: ${{ github.event.inputs.tag }} python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Switch to Workspace
run: |
echo ${{ github.workspace }}
cd ${{ github.workspace }}
- name: Get Library Version
id: get_version
run: |
pip install setuptools
lib_version=$(python setup.py --version)
echo "Library Version: $lib_version"
echo ::set-output name=version::"$lib_version"
echo ::set-output name=v_version::"v$lib_version"
- name: Preqrequisites
run: |
git submodule update --init --recursive
# run build command
- name: Build
run: |
python -m pip install -r dev-requirements.txt
python setup.py bdist_wheel
ls dist
# upload dist
- name: Upload binaries to release
if: ${{ github.event.inputs.publishReleases == 'true' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.whl
tag: ${{ steps.get_version.outputs.v_version }}
release_name: "Version ${{ steps.get_version.outputs.version }}"
body: "Prebuilt wheel packages version ${{ steps.get_version.outputs.version }}."
overwrite: true
file_glob: true