6
6
jobs :
7
7
build :
8
8
uses : ./.github/workflows/build.yaml
9
-
10
9
release :
11
- strategy :
12
- matrix :
13
- config :
14
- - {
15
- os : " ubuntu-latest" ,
16
- arch : " x86_64" ,
17
- }
18
- - {
19
- os : " ubuntu-latest" ,
20
- arch : " aarch64"
21
- }
22
10
permissions :
23
11
contents : write
24
12
packages : write
25
13
needs : build
26
14
if : startsWith(github.ref, 'refs/tags/v')
27
- runs-on : ${{ matrix.config.os }}
15
+ runs-on : ubuntu-latest
28
16
steps :
29
17
- uses : actions/checkout@v2
30
18
- name : Set RELEASE_VERSION ENV var
@@ -34,36 +22,28 @@ jobs:
34
22
run : |
35
23
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
36
24
echo "RUNNER_OS=$OS" >> $GITHUB_ENV
37
- - uses : actions/cache@v3
38
- with :
39
- path : |
40
- ./deployments/k3d/.tmp/
41
- ./bin
42
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
43
- - name : package release assets
44
- run : |
45
- mkdir _dist
46
- cp bin/containerd-shim-*-v1 _dist/
47
- cd _dist
48
- tar czf containerd-wasm-shims-v1-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz containerd-shim-*-v1
49
25
- name : copy release workload assets into _dist
50
26
run : |
51
27
cp ./deployments/workloads/spin/runtime.yaml _dist/spin_runtime.yaml
52
28
cp ./deployments/workloads/spin/workload.yaml _dist/spin_workload.yaml
53
29
cp ./deployments/workloads/slight/runtime.yaml _dist/slight_runtime.yaml
54
30
cp ./deployments/workloads/slight/workload.yaml _dist/slight_workload.yaml
31
+ - uses : actions/download-artifact@v3
32
+ with :
33
+ path : _artifacts
55
34
- name : create release
56
35
env :
57
36
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58
37
run : |
59
38
gh release create ${{ env.RELEASE_VERSION }} \
60
39
--generate-notes \
61
40
-p \
62
- _dist/containerd-wasm-shims-v1-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz#containerd-wasm-shims-v1 \
63
41
_dist/spin_runtime.yaml#example-spin-runtimes \
64
42
_dist/spin_workload.yaml#example-spin-workloads \
65
43
_dist/slight_runtime.yaml#example-slight-runtimes \
66
44
_dist/slight_workload.yaml#example-slight-workloads
45
+
46
+ for f in ./_artifacts/*/*.tar.gz; do gh release upload ${{ env.RELEASE_VERSION }} $f; done
67
47
- name : setup buildx
68
48
uses : docker/setup-buildx-action@v2
69
49
- name : login to GitHub container registry
88
68
ghcr.io/deislabs/containerd-wasm-shims/examples/slight-rust-hello:${{ env.RELEASE_VERSION }}
89
69
ghcr.io/deislabs/containerd-wasm-shims/examples/slight-rust-hello:latest
90
70
context : images/slight
71
+ - name : untar x86_64 musl artifacts into ./deployments/k3d/.tmp dir
72
+ run : |
73
+ mkdir -p ./deployments/k3d/.tmp
74
+ tar -xf ./_artifacts/containerd-wasm-shims-v1-linux-x86_64/containerd-wasm-shims-v1-linux-x86_64.tar.gz \
75
+ --directory ./deployments/k3d/.tmp
91
76
- name : build and push k3d shim image
92
77
uses : docker/build-push-action@v3
93
78
with :
0 commit comments