Skip to content

Commit 84b7d5f

Browse files
committed
fix cd
1 parent 141d121 commit 84b7d5f

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

.github/workflows/cd.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ on:
1010
default: '0.1.0'
1111
jobs:
1212
build_and_push:
13-
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
platform:
17+
- os: ubuntu-latest
18+
artifact_os_name: ubuntu
19+
- os: macos-latest
20+
artifact_os_name: macos
21+
- os: windows-latest
22+
artifact_os_name: windows
23+
runs-on: ${{ matrix.platform.os }}
1424
permissions:
1525
contents: read
1626

@@ -27,12 +37,22 @@ jobs:
2737
run: sbt clean stage
2838

2939
- name: package
30-
run: jpackage --name https-proxy --input target/universal/stage/lib --main-jar https-proxy.https-proxy-${{ inputs.version }}.jar --main-class Main --type app-image --win-console
31-
- name: release
32-
# 上传 https-proxy 目录
40+
run: jpackage --name https-proxy --input target/universal/stage/lib --main-jar https-proxy.https-proxy-${{ inputs.version }}.jar --main-class Main --type app-image
41+
42+
- name: Upload macOS artifact
43+
if: matrix.platform.artifact_os_name == 'macos'
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: https-proxy-${{ matrix.platform.artifact_os_name }}-${{ inputs.version }}
47+
path: https-proxy.app
48+
if-no-files-found: error
49+
- name: Upload Linux/Windows artifact
50+
if: matrix.platform.artifact_os_name != 'macos'
3351
uses: actions/upload-artifact@v4
3452
with:
35-
name: https-proxy-${{ inputs.version }}
36-
path: https-proxy
53+
name: https-proxy-${{ matrix.platform.artifact_os_name }}-${{ inputs.version }}
54+
path: https-proxy
55+
if-no-files-found: error
56+
3757

3858

0 commit comments

Comments
 (0)