-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (42 loc) · 1.21 KB
/
macos-build.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
name: Build macOS App
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install user dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install build dependencies
run: |
pip install pyinstaller
- name: Build macOS app
run: |
pyinstaller project_exporter.spec
echo "Contents of dist directory:"
ls -R dist
- name: Create ZIP archive
run: |
cd dist
zip -r "../项目文件导出工具-macOS.zip" "项目文件导出工具.app"
cd ..
echo "Contents of current directory:"
ls -l
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./项目文件导出工具-macOS.zip
asset_name: 项目文件导出工具-macOS.zip
asset_content_type: application/zip