Release #95
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: Release | |
on: | |
create: | |
tags: | |
- v* | |
workflow_dispatch: | |
jobs: | |
build_momba: | |
name: Build Momba | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
- name: Install Poetry | |
run: python -m pip install poetry tomlkit | |
- name: Build momba | |
run: python release.py | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: packages | |
path: ./dist/* | |
build_engine_sdist: | |
name: Build Engine Source Distribution | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
- name: Install Maturin | |
run: python -m pip install maturin | |
- name: Build engine sdist | |
run: | | |
cd engine | |
maturin sdist -o dist | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: packages | |
path: ./engine/dist/*.tar.gz | |
build_engine_wheels_linux: | |
name: Build Linux Engine Wheel (${{ matrix.target }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: ["x86_64", "aarch64", "armv7"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Wheel | |
uses: messense/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
manylinux: auto | |
args: --release --out dist -m engine/Cargo.toml | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: packages | |
path: ./dist/*.whl | |
build_engine_wheels_windows: | |
name: Build Windows Engine Wheel (${{ matrix.target }}) | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
target: ["x86_64"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Wheel | |
uses: messense/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist -m engine/Cargo.toml | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: packages | |
path: ./dist/*.whl | |
build_engine_wheels_macos: | |
name: Build MacOS Engine Wheel (${{ matrix.target }}) | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
target: ["x86_64", "aarch64"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Wheel | |
uses: messense/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist -m engine/Cargo.toml | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: packages | |
path: ./dist/*.whl | |
publish: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
environment: pypi | |
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- build_momba | |
- build_engine_sdist | |
- build_engine_wheels_linux | |
- build_engine_wheels_windows | |
- build_engine_wheels_macos | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: packages | |
path: dist | |
- name: Display Files | |
run: ls -l dist | |
- name: Publish Package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
verify_metadata: false | |
password: ${{ secrets.PYPI_API_TOKEN }} |