-
-
Notifications
You must be signed in to change notification settings - Fork 7
109 lines (88 loc) · 3.27 KB
/
linux-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
name: Release for Linux
on:
push:
tags:
- "v*"
jobs:
build-x86_64:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Make sure the version string matches the tag
run: |
CYD_VERSION=$(cat package.json | grep '"version"' | cut -d'"' -f4)
TAG_VERSION=${GITHUB_REF#refs/tags/}
TAG_VERSION=${TAG_VERSION#v} # strip the leading 'v' from the tag
if [ "$CYD_VERSION" != "$TAG_VERSION" ]; then
echo "::error file=package.json,title=Version check failed::Version string in package.json $CYD_VERSION does not match the tag $TAG_VERSION"
exit 1
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: |
docker buildx create --use
docker buildx build -t my-builder --load .
- name: Build Linux release in Docker container
run: docker run --rm -v $(pwd):/workspace -w /workspace my-builder ./scripts/make-linux-release.sh
- name: Upload DEB artifacts
uses: actions/upload-artifact@v4
with:
name: deb-packages-x86_64
path: out/make/deb/x64/*.deb
- name: Upload RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpm-packages-x86_64
path: out/make/rpm/x64/*.rpm
- name: Upload ZIP artifacts
uses: actions/upload-artifact@v4
with:
name: zip-packages-x86_64
path: out/make/zip/linux/x64/*.zip
build-arm64:
runs-on: ubuntu-arm64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Make sure the version string matches the tag
run: |
CYD_VERSION=$(cat package.json | grep '"version"' | cut -d'"' -f4)
TAG_VERSION=${GITHUB_REF#refs/tags/}
TAG_VERSION=${TAG_VERSION#v} # strip the leading 'v' from the tag
if [ "$CYD_VERSION" != "$TAG_VERSION" ]; then
echo "::error file=package.json,title=Version check failed::Version string in package.json $CYD_VERSION does not match the tag $TAG_VERSION"
exit 1
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: |
docker buildx create --use
docker buildx build -t my-builder --load .
- name: Build Linux release in Docker container
run: docker run --rm -v $(pwd):/workspace -w /workspace my-builder ./scripts/make-linux-release.sh
- name: Upload DEB artifacts
uses: actions/upload-artifact@v4
with:
name: deb-packages-arm64
path: out/make/deb/arm64/*.deb
- name: Upload RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpm-packages-arm64
path: out/make/rpm/arm64/*.rpm
- name: Upload ZIP artifacts
uses: actions/upload-artifact@v4
with:
name: zip-packages-arm64
path: out/make/zip/linux/arm64/*.zip