Skip to content

Commit 0912dbb

Browse files
committed
update workflows
1 parent 2798fa3 commit 0912dbb

File tree

4 files changed

+102
-98
lines changed

4 files changed

+102
-98
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Build & Publish wheels
2+
on:
3+
workflow_dispatch
4+
5+
6+
jobs:
7+
build_sdist:
8+
name: Build source distribution
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
submodules: recursive
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Build sdist
21+
run: pipx run build --sdist
22+
23+
- name: Install sdist
24+
run: pip install dist/*.tar.gz
25+
26+
- uses: actions/upload-artifact@v3
27+
with:
28+
path: dist/*.tar.gz
29+
30+
build_wheels:
31+
name: Build wheels on ${{ matrix.os }}
32+
runs-on: ${{ matrix.os }}
33+
needs: [build_sdist]
34+
strategy:
35+
fail-fast: true
36+
matrix:
37+
os: [windows-latest, macos-latest]
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
with:
42+
submodules: recursive
43+
44+
- name: Build wheels
45+
uses: joerick/[email protected]
46+
47+
- uses: actions/upload-artifact@v3
48+
with:
49+
path: ./wheelhouse/*.whl
50+
51+
build_wheels_ubuntu:
52+
name: Build x86 manylinux wheels on ubuntu-latest
53+
runs-on: ubuntu-latest
54+
needs: [build_sdist]
55+
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
submodules: recursive
60+
61+
- name: Set up QEMU
62+
uses: docker/setup-qemu-action@v3
63+
with:
64+
platforms: all
65+
66+
- name: Build wheels
67+
uses: joerick/[email protected]
68+
69+
- uses: actions/upload-artifact@v3
70+
with:
71+
path: ./wheelhouse/*.whl
72+
73+
74+
upload_pypi:
75+
name: Publish to PyPI
76+
needs: [build_wheels, build_wheels_ubuntu, build_sdist]
77+
runs-on: ubuntu-latest
78+
79+
permissions:
80+
id-token: write
81+
steps:
82+
- uses: actions/download-artifact@v3
83+
with:
84+
name: artifact
85+
path: dist
86+
87+
- name: Publish package distributions to PyPI
88+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,27 @@
11
name: Test
2-
32
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request: {}
8-
9-
3+
push
104

115
jobs:
12-
test:
6+
build_wheels:
7+
name: Build wheels on ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
139
strategy:
1410
fail-fast: false
1511
matrix:
16-
os: ["ubuntu-latest", "windows-latest"]
17-
18-
runs-on: ${{ matrix.os }}
19-
name: ${{ matrix.os }}
20-
timeout-minutes: 10
12+
os: [ubuntu-latest, windows-latest, macos-latest]
2113

2214
steps:
23-
- uses: actions/checkout@v3
24-
15+
- uses: actions/checkout@v4
16+
2517
- name: Set up Python
26-
uses: actions/setup-python@v4
18+
uses: actions/setup-python@v5
19+
if: matrix.os == 'ubuntu-latest'
2720
with:
28-
python-version: "3.7"
29-
30-
- name: Install Dependencies
31-
run: |
32-
python -m pip install --upgrade pip pytest psutil
21+
python-version: '3.7'
3322

34-
- name: Install UnityPy
35-
run: |
36-
pip install .
23+
- name: Install
24+
run: pip install .[tests]
3725

3826
- name: Run tests
39-
run: |
40-
pytest -v -s
27+
run: pytest -vs ./tests

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![PyPI supported Python versions](https://img.shields.io/pypi/pyversions/UnityPy.svg)](https://pypi.python.org/pypi/UnityPy)
55
[![Win/Mac/Linux](https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-informational)]()
66
[![MIT](https://img.shields.io/github/license/K0lb3/UnityPy)](https://github.com/K0lb3/UnityPy/blob/master/LICENSE)
7-
![Test and Publish](https://github.com/K0lb3/UnityPy/workflows/Test%20and%20Publish/badge.svg)
7+
![Test](https://github.com/K0lb3/UnityPy/workflows/Test/badge.svg)
88

99
A Unity asset extractor for Python based on [AssetStudio](https://github.com/Perfare/AssetStudio).
1010

0 commit comments

Comments
 (0)