-
Notifications
You must be signed in to change notification settings - Fork 19
69 lines (55 loc) · 1.69 KB
/
build_wheels_linux.yml
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
name: Build and publish Python wheels for Linux
on:
push:
branches:
- release
- release-rc.*
jobs:
build-wheels:
name: Build wheels on Ubuntu
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: 签出rust代码
uses: actions/checkout@v2
- name: 签出前端
uses: actions/checkout@v2
with:
repository: GiantAxeWhy/atomic-bomb-engine-front
path: vue-project
- name: 安装Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: 构建前端
run: |
cd vue-project
npm install
npm run build
- name: 删除原有dist
run: rm -rf python/atomic_bomb_engine/dist/*
- name: 复制dist到Python项目
run: cp -r vue-project/dist/* python/atomic_bomb_engine/dist/
- name: 设置python环境
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: 安装Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: 安装maturin
run: pip install maturin
- name: 构建wheels
run: maturin build --release --interpreter python${{ matrix.python-version }}
- name: 安装Twine
run: pip install twine
- name: 上传wheels到PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload --skip-existing --repository-url https://upload.pypi.org/legacy/ target/wheels/*.whl