Skip to content

Commit 058b1a9

Browse files
committed
ci:get out of client build
1 parent 038e3b0 commit 058b1a9

File tree

2 files changed

+65
-38
lines changed

2 files changed

+65
-38
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: spa-client build
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
7+
jobs:
8+
client:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
settings:
13+
- os: ubuntu-latest
14+
target: x86_64-unknown-linux-musl
15+
name: spa-client-linux-musl-x86_64
16+
command: make release-linux-client-musl
17+
- os: macos-12
18+
target: x86_64-apple-darwin
19+
name: spa-client-macos-x86_64
20+
command: make release-client-mac
21+
- os: macos-14
22+
target: aarch64-apple-darwin
23+
name: spa-client-macos-aarch64
24+
command: make release-client-mac
25+
- os: windows-latest
26+
target: x86_64-pc-windows-msvc
27+
name: spa-client-windows-x86_64
28+
command: make release-client-win
29+
runs-on: ${{ matrix.settings.os }}
30+
steps:
31+
- name: Get version
32+
uses: actions/checkout@v4
33+
with:
34+
submodules: true
35+
- uses: Swatinem/rust-cache@v2
36+
with:
37+
key: ${{ matrix.settings.target }}
38+
- name: Setup MUSL
39+
if: matrix.settings.os == 'ubuntu-latest'
40+
run: |
41+
rustup target add x86_64-unknown-linux-musl
42+
sudo apt-get -qq install musl-tools
43+
44+
- name: Build Release
45+
run: ${{ matrix.settings.command }}
46+
47+
- name: Upload artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
path: ./release/*
51+
name: ${{ matrix.settings.name }}
52+
if-no-files-found: error

.github/workflows/spa-server-cd.yml

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,7 @@ env:
99

1010
jobs:
1111
client:
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
settings:
16-
- os: ubuntu-latest
17-
name: linux-spa-client
18-
bash: make release-linux-client-musl
19-
- os: macos-latest
20-
name: mac-spa-client
21-
bash: make release-client-mac
22-
- os: windows-latest
23-
name: windows-spa-client
24-
bash: make release-client-win
25-
runs-on: ${{ matrix.settings.os }}
26-
steps:
27-
- name: Get version
28-
uses: actions/checkout@v4
29-
with:
30-
submodules: true
31-
- uses: Swatinem/rust-cache@v2
32-
- name: Setup MUSL
33-
if: matrix.settings.os == 'ubuntu-latest'
34-
run: |
35-
rustup target add x86_64-unknown-linux-musl
36-
sudo apt-get -qq install musl-tools
37-
38-
- name: Build Release
39-
run: ${{ matrix.settings.bash }}
40-
41-
- name: Upload artifact
42-
uses: actions/upload-artifact@v4
43-
with:
44-
path: ./release/*
45-
name: ${{ matrix.settings.name }}
46-
if-no-files-found: error
12+
uses: ./.github/workflows/spa-client-build.yml
4713
docker:
4814
runs-on: ubuntu-latest
4915
steps:
@@ -97,10 +63,19 @@ jobs:
9763
path: ./release/*
9864
name: spa-server-linux-musl
9965
if-no-files-found: error
66+
release:
67+
runs-on: ubuntu-latest
68+
needs: [client, docker, binFile]
69+
steps:
70+
- name: Download all artifacts
71+
uses: actions/download-artifact@v4
72+
with:
73+
path: artifacts
74+
- name: list artifacts
75+
run: ls -R artifacts
10076
- name: Create Release
10177
uses: ncipollo/release-action@v1
102-
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
10378
with:
104-
artifacts: spa-server-*
105-
token: ${{ secrets.YOUR_GITHUB_TOKEN }}
79+
artifacts: "artifacts/**/*"
80+
token: ${{ secrets.GITHUB_TOKEN }}
10681
draft: true

0 commit comments

Comments
 (0)