forked from K0lb3/UnityPy
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (68 loc) · 2.65 KB
/
Copy pathpython-package.yml
File metadata and controls
85 lines (68 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Test and Publish
on: [push, pull_request, workflow_dispatch]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.7"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip pytest
- name: Install UnityPy
run: |
pip install .
- name: Run tests
run: |
pytest -v -s
release:
needs: [test]
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
cp: ["cp37", "cp38", "cp39", "cp310"]
timeout-minutes: 30
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} - ${{ matrix.cp }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools hatch
pip install --upgrade twine
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: auto aarch64
CIBW_BUILD: |
${{ matrix.cp }}-manylinux_x86_64 ${{ matrix.cp }}-manylinux_i686 ${{ matrix.cp }}-manylinux_aarch64 ${{ matrix.cp }}-win_amd64 ${{ matrix.cp }}-win32 ${{ matrix.cp }}-macosx_x86_64
CIBW_REPAIR_WHEEL_COMMAND: "" # Disable auditwheel
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest -v -s {package}/tests
- name: Publish to PyPI
if: success() && github.event_name == 'push' && env.TWINE_PASSWORD != '' && github.ref == 'refs/heads/master'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload ./wheelhouse/*.whl --skip-existing
hatch build -t sdist
twine upload ./dist/*.tar.gz --skip-existing