-
-
Notifications
You must be signed in to change notification settings - Fork 399
150 lines (146 loc) · 5.92 KB
/
release.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
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
141
142
143
144
145
146
147
148
149
150
{
'name': 'Release',
'on': { 'release': { 'types': ['published'] } },
'jobs':
{
'publish-release':
{
'runs-on': 'ubuntu-latest',
'strategy': { 'matrix': { 'node-version': ['20.x'] } },
'steps':
[
{ 'uses': 'actions/checkout@v4' },
{
'name': 'Use Node.js ${{ matrix.node-version }}',
'uses': 'actions/setup-node@v4',
'with': { 'node-version': '${{ matrix.node-version }}' },
},
{ 'name': 'Install', 'run': 'npm ci' },
{
'name': 'Generate OpenAPI Docs',
'run': 'npm run build_openapi_schema',
},
{
'name': 'Build Valetudo frontend',
'run': 'npm run build --workspace=frontend',
},
{
'name': 'Build Valetudo armv7',
'run': 'npm run build_armv7 --workspace=backend',
},
{
'name': 'Build Valetudo armv7 lowmem',
'run': 'npm run build_armv7_lowmem --workspace=backend',
},
{
'name': 'Build Valetudo aarch64',
'run': 'npm run build_aarch64 --workspace=backend',
},
{
'name': 'Upload Valetudo armv7',
'uses': 'hypfer/[email protected]',
'env': { 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}' },
'with':
{
'upload_url': '${{ github.event.release.upload_url }}',
'asset_path': './build/armv7/valetudo',
'asset_name': 'valetudo-armv7',
'asset_content_type': 'binary/octet-stream',
},
},
{
'name': 'Upload Valetudo armv7 lowmem',
'uses': 'hypfer/[email protected]',
'env': { 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}' },
'with':
{
'upload_url': '${{ github.event.release.upload_url }}',
'asset_path': './build/armv7/valetudo-lowmem',
'asset_name': 'valetudo-armv7-lowmem',
'asset_content_type': 'binary/octet-stream',
},
},
{
'name': 'Upload Valetudo aarch64',
'uses': 'hypfer/[email protected]',
'env': { 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}' },
'with':
{
'upload_url': '${{ github.event.release.upload_url }}',
'asset_path': './build/aarch64/valetudo',
'asset_name': 'valetudo-aarch64',
'asset_content_type': 'binary/octet-stream',
},
},
{
'name': 'UPX-compress valetudo binaries',
'run': 'npm run upx',
},
{
'name': 'Upload Valetudo armv7.upx',
'uses': 'hypfer/[email protected]',
'env': { 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}' },
'with':
{
'upload_url': '${{ github.event.release.upload_url }}',
'asset_path': './build/armv7/valetudo.upx',
'asset_name': 'valetudo-armv7.upx',
'asset_content_type': 'binary/octet-stream',
},
},
{
'name': 'Upload Valetudo armv7 lowmem.upx',
'uses': 'hypfer/[email protected]',
'env': { 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}' },
'with':
{
'upload_url': '${{ github.event.release.upload_url }}',
'asset_path': './build/armv7/valetudo-lowmem.upx',
'asset_name': 'valetudo-armv7-lowmem.upx',
'asset_content_type': 'binary/octet-stream',
},
},
{
'name': 'Upload Valetudo aarch64.upx',
'uses': 'hypfer/[email protected]',
'env': { 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}' },
'with':
{
'upload_url': '${{ github.event.release.upload_url }}',
'asset_path': './build/aarch64/valetudo.upx',
'asset_name': 'valetudo-aarch64.upx',
'asset_content_type': 'binary/octet-stream',
},
},
{
'name': 'Build manifest',
'run': 'npm run build_release_manifest',
},
{
'name': 'Upload manifest',
'uses': 'hypfer/[email protected]',
'env': { 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}' },
'with':
{
'upload_url': '${{ github.event.release.upload_url }}',
'asset_path': './build/valetudo_release_manifest.json',
'asset_name': 'valetudo_release_manifest.json',
'asset_content_type': 'application/json',
},
},
{
'name': 'Upload OpenAPI spec',
'uses': 'hypfer/[email protected]',
'env': { 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}' },
'with':
{
'upload_url': '${{ github.event.release.upload_url }}',
'asset_path': './build/valetudo.openapi.schema.json',
'asset_name': 'valetudo.openapi.schema.json',
'asset_content_type': 'application/json',
},
},
],
},
},
}