Skip to content

Commit c115c77

Browse files
committed
build: make it runnable of cd files
1. spa-client-cd 2. spa-clkient-docker-cd 3. spa-server-docker-cd
1 parent 5289a71 commit c115c77

File tree

8 files changed

+2498
-33
lines changed

8 files changed

+2498
-33
lines changed

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

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# this is from https://github.com/extrawurst/gitui/blob/master/.github/workflows/cd.yml
2-
# this does not work now!
2+
33
name: spa-client-cd
44

55
on:
@@ -25,22 +25,21 @@ jobs:
2525
uses: actions/checkout@v3
2626
with:
2727
submodules: true
28-
ref: ${{github.event.inputs.tag}}
2928

3029
- name: Install Rust
31-
uses: actions-rs/toolchain@v2
30+
uses: actions-rs/toolchain@v1
3231
with:
3332
toolchain: stable
34-
35-
- name: Install Node
36-
uses: actions/setup-node@v2
33+
- name: Cache cargo registry
34+
uses: actions/cache@v2
3735
with:
38-
node-version: "16"
39-
cache: "npm"
40-
41-
- name: Build
42-
run: cargo build
43-
36+
path: ~/.cargo/registry
37+
key: ${{ matrix.os }}-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
38+
- name: Cache cargo index
39+
uses: actions/cache@v2
40+
with:
41+
path: ~/.cargo/git
42+
key: ${{ matrix.os }}-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
4443
- name: Setup MUSL
4544
if: matrix.os == 'ubuntu-latest'
4645
run: |
@@ -57,4 +56,10 @@ jobs:
5756

5857
- name: Build Release Win
5958
if: matrix.os == 'windows-latest'
60-
run: make release-win
59+
run: make release-win
60+
61+
- name: Upload artifact
62+
uses: actions/upload-artifact@v2
63+
with:
64+
path: ./release/*
65+
if-no-files-found: error

.github/workflows/spa-client-docker-cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: sap-client docker release
33
on:
44
workflow_dispatch:
55
inputs:
6-
tag:
6+
version:
77
required: true
8-
description: "git tag to release"
8+
description: "version to release"
99

1010
jobs:
1111
docker:
@@ -34,4 +34,4 @@ jobs:
3434
file: SPA-Client.Dockerfile
3535
platforms: linux/amd64,linux/arm64
3636
push: true
37-
tags: timzaak/spa-client:${{github.event.inputs.tag}}
37+
tags: timzaak/spa-client:${{github.event.inputs.version}}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: spa-server-docker-release
33
on:
44
workflow_dispatch:
55
inputs:
6-
tag:
6+
version:
77
required: true
8-
description: "git tag to release"
8+
description: "version to release"
99

1010
jobs:
1111
docker:
@@ -33,4 +33,4 @@ jobs:
3333
context: .
3434
platforms: linux/amd64,linux/arm64
3535
push: true
36-
tags: timzaak/spa-server:${{github.event.inputs.tag}}
36+
tags: timzaak/spa-server:${{github.event.inputs.version}}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/target
2-
Cargo.lock
32
.idea
43
/tmp
54
config.conf

0 commit comments

Comments
 (0)