Skip to content

v2.2.0

v2.2.0 #44

Workflow file for this run

name: Build wheels for cli
on:
push:
tags:
- "*"
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
# Linux manylinux
- runner: ubuntu-22.04
target: x86_64
rid: linux-x64
manylinux: auto
# - runner: ubuntu-22.04
# target: aarch64
# rid: linux-arm64
# manylinux: auto
# Linux musllinux
# - runner: ubuntu-22.04
# target: x86_64
# rid: linux-musl-x64
# manylinux: musllinux_1_2
# - runner: ubuntu-22.04
# target: aarch64
# rid: linux-musl-arm64
# manylinux: musllinux_1_2
# Windows
- runner: windows-latest
target: x64
rid: win-x64
manylinux: ""
# MacOS
- runner: macos-13
target: x86_64
rid: osx-x64
manylinux: ""
- runner: macos-14
target: aarch64
rid: osx-arm64
manylinux: ""
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.x"
- name: Clone TypeTreeGeneratorAPI
uses: actions/checkout@v4
with:
repository: jakobhellermann/TypeTreeGeneratorAPI
submodules: true
ref: wip
path: TypeTreeGeneratorAPI
- name: Publish TypeTreeGeneratorAPI with dotnet
run: dotnet publish TypeTreeGeneratorAPI/TypeTreeGeneratorAPI -o tt-api-lib --runtime ${{ matrix.rid }} -p:EnableAssetRipper=false -p:EnableAssetStudio=false -p:EnableAssetsTools=true -p:EnableIL2CPP=false
- name: Copy importlib to output
if: runner.os == 'windows'
run: cp TypeTreeGeneratorAPI/TypeTreeGeneratorAPI/bin/Release/net9.0/win-x64/native/TypeTreeGeneratorAPI.lib ./tt-api-lib/
- name: Build wheels
env:
RUSTFLAGS: "-L tt-api-lib"
LD_LIBRARY_PATH: "${{ github.workspace }}/tt-api-lib"
uses: jakobhellermann/maturin-action@allow-ld-env
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: ${{ matrix.manylinux }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.runner }}-${{ matrix.target }}${{ matrix.manylinux }}
path: dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [build, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-path: "wheels-*/*"
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*