-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (69 loc) · 2.21 KB
/
ci.yml
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
name: CI
on:
release:
types: [created]
push:
branches:
- "**"
paths-ignore:
- ".vscode/**"
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/ci.yml"
- "**.md"
pull_request:
paths-ignore:
- ".vscode/**"
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/ci.yml"
- "**.md"
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [debug, release]
container:
image: ghcr.io/ten-framework/ten_agent_build:0.2.2
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
submodules: "true"
- name: Update version for release
if: startsWith(github.ref, 'refs/tags/')
run: |
# replace version by tag
jq '.version = "${{ github.ref_name }}"' manifest.json >manifest.gen.json
# check after replace
diff manifest.gen.json manifest.json || true
mv manifest.gen.json manifest.json
jq . manifest.json
- name: Build
run: |
tman install
tgn gen linux x64 ${{ matrix.build_type }} -- is_clang=false
tgn build linux x64 ${{ matrix.build_type }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: azure_tts-linux-x64-gcc-${{ matrix.build_type }}
path: |
out/linux/x64/ten_packages/extension/azure_tts
- name: Package release assets
if: startsWith(github.ref, 'refs/tags/')
run: |
cd out/linux/x64/ten_packages/extension
zip -vr azure_tts-linux-x64-gcc-${{ matrix.build_type }}.zip azure_tts
- name: Publish to release assets
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
out/linux/x64/ten_packages/extension/azure_tts-linux-x64-gcc-${{ matrix.build_type }}.zip
- name: Publish release to TEN cloud store
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.build_type == 'release' }}
run: |
cd out/linux/x64/ten_packages/extension/azure_tts
tman --verbose --user-token ${{ secrets.TEN_CLOUD_STORE }} publish