Skip to content

refactor: remove getServerThread global function #1532

refactor: remove getServerThread global function

refactor: remove getServerThread global function #1532

Workflow file for this run

name: Wheel
on:
push:
branches:
- main
tags:
- '*'
workflow_dispatch:
permissions: read-all
jobs:
build_wheels:
name: Build Wheel (${{ matrix.python-tag }}-${{ matrix.platform }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-2019 ]
python-tag: [ "cp39", "cp310", "cp311", "cp312", "cp313" ]
include:
- os: ubuntu-latest
platform: manylinux_x86_64
- os: windows-2019
platform: win_amd64
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Conan
uses: actions/cache@v4
with:
path: ~/.conan2/p
key: ${{ runner.os }}-conan-Release-${{ hashFiles('conanfile.py') }}
restore-keys: |
${{ runner.os }}-conan-Release-
${{ runner.os }}-conan-
${{ runner.os }}-
- name: Set up MSVC (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86_64
- name: Set up CMake and Ninja
uses: lukka/get-cmake@latest
- name: Set Conan Home (Linux)
if: runner.os == 'Linux'
run: echo "CONAN_HOME=/host${HOME}/.conan2" >> $GITHUB_ENV
- name: Build wheels
uses: pypa/[email protected]
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
CIBW_BUILD: ${{ matrix.python-tag }}-${{ matrix.platform }}
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT_PASS_LINUX: "CONAN_HOME SENTRY_AUTH_TOKEN"
- uses: actions/upload-artifact@v4
with:
name: endstone-wheels-${{ matrix.python-tag }}-${{ matrix.platform }}
path: ./wheelhouse/*.whl
publish:
name: Publish Wheels to PyPI
if: contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [ build_wheels ]
environment: pypi
permissions:
id-token: write
contents: write
steps:
- name: Restore Artifacts
uses: actions/download-artifact@v4
with:
pattern: endstone-wheels-*
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1