Skip to content

Commit 1c292d2

Browse files
authored
Merge pull request #35 from GOOD-AN/dev
update: 自动构建压缩软件使用最新版本
2 parents 3fa4632 + dff6ec9 commit 1c292d2

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- name: Check-out repository
1818
uses: actions/checkout@v3
1919

20+
# Prepared environment
2021
- name: Set up Python 3.11
2122
uses: actions/setup-python@v4
2223
with:
@@ -40,6 +41,7 @@ jobs:
4041
with:
4142
install-only: true
4243

44+
# Compilation
4345
- name: Build (Windows)
4446
if: ${{ runner.os == 'Windows' }}
4547
uses: Nuitka/Nuitka-Action@main
@@ -81,10 +83,30 @@ jobs:
8183
include-data-dir: config=config
8284
macos-app-icon: data/images/logo_small.ico
8385

84-
- name: Compressed Files
86+
# Compressed Files
87+
- name: Install 7zip (macOS)
88+
if: ${{ runner.os == 'macOS' }}
89+
run: |
90+
brew update
91+
brew install sevenzip
92+
93+
- name: Install 7zip (Linux)
94+
if: ${{ runner.os == 'Linux' }}
95+
run: |
96+
wget https://www.7-zip.org/a/7z2201-linux-x64.tar.xz
97+
tar -xf 7z2201-linux-x64.tar.xz
98+
sudo cp 7zz /usr/bin/7zz
99+
100+
- name: Compressed Files (Windows)
101+
if: ${{ runner.os == 'Windows' }}
85102
run: |
86103
7z a -tzip -mx=9 -mm=LZMA -mfb=258 -mmt=on ./build/meg-${{ runner.os }}-x86_64.zip ./build/main.dist/*
87104
105+
- name: Compressed Files (Linux & macOS)
106+
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
107+
run: |
108+
7zz a -tzip -mx=9 -mm=LZMA -mfb=258 -mmt=on ./build/meg-${{ runner.os }}-x86_64.zip ./build/main.dist/*
109+
88110
- name: Upload Artifacts
89111
uses: actions/upload-artifact@v3
90112
with:

0 commit comments

Comments
 (0)