-
-
Notifications
You must be signed in to change notification settings - Fork 17
140 lines (124 loc) · 5.73 KB
/
create-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: create-release
on:
push:
tags: [ "v[0-9]+.[0-9]+.[0-9]+", "test-release**" ]
jobs:
build-tool:
uses: ./.github/workflows/build-tool.yaml
build-runtime:
uses: ./.github/workflows/build-runtime.yaml
release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: [build-tool, build-runtime]
steps:
- uses: actions/checkout@v4
with:
path: repo
sparse-checkout: |
resources
- uses: actions/download-artifact@v4
with:
# when name is not specified, all artifacts from this run will be downloaded
path: artifacts
merge-multiple: true
- name: Package CLI Tool
run: |
mkdir releases
cp artifacts/orca.exe releases
cp artifacts/orca-mac-universal.tar.gz releases/orca-mac.tar.gz
- name: Package Windows Release
run: |
mkdir -p orca-sdk-windows/bin
mkdir -p orca-sdk-windows/orca-libc
mkdir -p orca-sdk-windows/resources
mkdir -p orca-sdk-windows/src
# gather fonts
cp repo/resources/* orca-sdk-windows/resources
# gather cli-tool
cp artifacts/orca.exe orca-sdk-windows/bin
# gather runtime
cd artifacts
tar -xzf orca-runtime-win.tar.gz
cd ..
cp artifacts/orca-runtime-win/bin/runtime.obj orca-sdk-windows/bin
cp artifacts/orca-runtime-win/bin/orca.dll orca-sdk-windows/bin
cp artifacts/orca-runtime-win/bin/orca.dll.lib orca-sdk-windows/bin
cp artifacts/orca-runtime-win/bin/liborca_wasm.a orca-sdk-windows/bin
cp artifacts/orca-runtime-win/bin/wasm3.lib orca-sdk-windows/bin
cp artifacts/orca-runtime-win/bin/libEGL.dll orca-sdk-windows/bin
cp artifacts/orca-runtime-win/bin/libGLESv2.dll orca-sdk-windows/bin
# gather source code
cp -r artifacts/src-win/* orca-sdk-windows/src
# TODO(shaw): gather orca-libc once it is built by ci
# generate checksum file
find orca-sdk-windows -type f -exec sha1sum {} + | LC_ALL=C sort | sha1sum | cut -z -f 1 -d " " > sha1.sum
# create release tarball
tar --format=ustar -czf orca-sdk-windows.tar.gz orca-sdk-windows sha1.sum
mv orca-sdk-windows.tar.gz releases
- name: Package Mac x64 Release
run: |
mkdir -p orca-sdk-mac-x64/bin
mkdir -p orca-sdk-mac-x64/orca-libc
mkdir -p orca-sdk-mac-x64/resources
mkdir -p orca-sdk-mac-x64/src
# gather fonts
cp repo/resources/* orca-sdk-mac-x64/resources
# gather cli-tool
cd artifacts
tar -xzf orca-mac-universal.tar.gz
cd ..
cp artifacts/orca orca-sdk-mac-x64/bin
# gather runtime
cd artifacts
tar -xzf orca-runtime-mac-x64.tar.gz
cd ..
cp artifacts/orca-runtime-mac-x64/bin/orca_runtime orca-sdk-mac-x64/bin
cp artifacts/orca-runtime-mac-x64/bin/liborca.dylib orca-sdk-mac-x64/bin
cp artifacts/orca-runtime-mac-x64/bin/liborca_wasm.a orca-sdk-mac-x64/bin
cp artifacts/orca-runtime-mac-x64/bin/libEGL.dylib orca-sdk-mac-x64/bin
cp artifacts/orca-runtime-mac-x64/bin/libGLESv2.dylib orca-sdk-mac-x64/bin
cp artifacts/orca-runtime-mac-x64/bin/mtl_renderer.metallib orca-sdk-mac-x64/bin
# gather source code
cp -r artifacts/src-mac-x64/* orca-sdk-mac-x64/src
# TODO(shaw): gather orca-libc once it is built by ci
# generate checksum file
find orca-sdk-mac-x64 -type f -exec sha1sum {} + | LC_ALL=C sort | sha1sum | cut -z -f 1 -d " " > sha1.sum
# create release tarball
tar --format=ustar -czf orca-sdk-mac-x64.tar.gz orca-sdk-mac-x64 sha1.sum
mv orca-sdk-mac-x64.tar.gz releases
- name: Package Mac arm64 Release
run: |
mkdir -p orca-sdk-mac-arm64/bin
mkdir -p orca-sdk-mac-arm64/orca-libc
mkdir -p orca-sdk-mac-arm64/resources
mkdir -p orca-sdk-mac-arm64/src
# gather fonts
cp repo/resources/* orca-sdk-mac-arm64/resources
# gather cli-tool
cd artifacts
tar -xzf orca-mac-universal.tar.gz
cd ..
cp artifacts/orca orca-sdk-mac-arm64/bin
# gather runtime
cd artifacts
tar -xzf orca-runtime-mac-arm64.tar.gz
cd ..
cp artifacts/orca-runtime-mac-arm64/bin/orca_runtime orca-sdk-mac-arm64/bin
cp artifacts/orca-runtime-mac-arm64/bin/liborca.dylib orca-sdk-mac-arm64/bin
cp artifacts/orca-runtime-mac-arm64/bin/liborca_wasm.a orca-sdk-mac-arm64/bin
cp artifacts/orca-runtime-mac-arm64/bin/libEGL.dylib orca-sdk-mac-arm64/bin
cp artifacts/orca-runtime-mac-arm64/bin/libGLESv2.dylib orca-sdk-mac-arm64/bin
cp artifacts/orca-runtime-mac-arm64/bin/mtl_renderer.metallib orca-sdk-mac-arm64/bin
# gather source code
cp -r artifacts/src-mac-arm64/* orca-sdk-mac-arm64/src
# TODO(shaw): gather orca-libc once it is built by ci
# generate checksum file
find orca-sdk-mac-arm64 -type f -exec sha1sum {} + | LC_ALL=C sort | sha1sum | cut -z -f 1 -d " " > sha1.sum
# create release tarball
tar --format=ustar -czf orca-sdk-mac-arm64.tar.gz orca-sdk-mac-arm64 sha1.sum
mv orca-sdk-mac-arm64.tar.gz releases
- uses: ncipollo/release-action@v1
with:
artifacts: "releases/*"