Skip to content

Commit ddbc554

Browse files
committed
Draft Release
Added wheel build dependency Updated workflow
1 parent fba3de7 commit ddbc554

File tree

2 files changed

+41
-9
lines changed

2 files changed

+41
-9
lines changed

.github/workflows/package_build.yaml

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ubuntu-latest
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, windows-latest, macos-latest]
13+
include:
14+
- os: ubuntu-latest
15+
suffix: linux-x64
16+
- os: windows-latest
17+
suffix: windows-x64.exe
18+
- os: macos-latest
19+
suffix: macos-x64
20+
1021
steps:
1122
- uses: actions/checkout@v4
1223

@@ -18,24 +29,45 @@ jobs:
1829
- name: Install tools
1930
run: pip install build wheel pyinstaller
2031

21-
- name: Build package
32+
- name: Build wheel
2233
run: python -m build --wheel --no-isolation
2334

2435
- name: Create executable
2536
run: |
2637
pip install ./dist/*.whl
27-
pyinstaller --onefile --name ecodevserver $(which eco-ext-dev)
2838
pyinstaller --onefile --name ecoserver $(which eco-ext)
39+
mv dist/ecoserver${{ matrix.os == 'windows-latest' && '.exe' || '' }} dist/ecoserver-${{ matrix.suffix }}
40+
pyinstaller --onefile --name ecodevserver $(which eco-ext-dev)
41+
mv dist/ecodevserver${{ matrix.os == 'windows-latest' && '.exe' || '' }} dist/ecodevserver-${{ matrix.suffix }}
42+
43+
- name: Upload artifacts
44+
uses: actions/upload-artifact@v3
45+
with:
46+
name: binaries-${{ matrix.os }}
47+
path: |
48+
dist/*.whl
49+
dist/ecoserver-*
50+
dist/ecodevserver-*
51+
52+
create-release:
53+
needs: build
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Download all artifacts
57+
uses: actions/download-artifact@v4
58+
with:
59+
path: artifacts
2960

3061
- name: Create GitHub Release
3162
uses: softprops/action-gh-release@v1
3263
with:
33-
name: "Version ${{ github.ref_name }}"
34-
body: "Pre-built package and executable"
64+
name: Version ${{ github.ref_name }}
65+
body: |
66+
${{ github.event.head_commit.message }}
3567
files: |
36-
dist/*.whl
37-
dist/ecodevserver*
38-
dist/ecoserver*
68+
artifacts/**/*.whl
69+
artifacts/**/ecoserver-*
70+
artifacts/**/ecodevserver-*
3971
draft: true
4072
prerelease: false
4173
env:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools >= 61.0"]
2+
requires = ["setuptools >= 61.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]

0 commit comments

Comments
 (0)