@@ -42,47 +42,34 @@ runs:
42
42
export version="${{ inputs.version }}"
43
43
case "${{ inputs.arch }}" in
44
44
x86_64)
45
- echo "deb_arch =amd64" >> $GITHUB_OUTPUT
45
+ echo "arch =amd64" >> $GITHUB_OUTPUT
46
46
;;
47
47
aarch64)
48
- echo "deb_arch =arm64" >> $GITHUB_OUTPUT
48
+ echo "arch =arm64" >> $GITHUB_OUTPUT
49
49
;;
50
50
*)
51
51
echo "Unsupported arch: ${{ inputs.arch }}"
52
52
exit 1
53
53
;;
54
54
esac
55
- deb_version=${version/-/. }
56
- echo "deb_version =${deb_version/v/}" >> $GITHUB_OUTPUT
57
- mkdir -p distro/{bin,configs,systemd,scripts}
55
+ deb_version=${version/-/'~' }
56
+ echo "version =${deb_version/v/}" >> $GITHUB_OUTPUT
57
+ mkdir -p distro/{bin,configs,systemd,scripts,pkg }
58
58
cp ./scripts/distribution/systemd/databend-* distro/systemd/
59
59
cp ./scripts/distribution/configs/databend-* distro/configs/
60
60
cp ./scripts/distribution/release-readme.txt distro/readme.txt
61
61
cp -r ./scripts/distribution/package-scripts/* distro/scripts/
62
62
63
- - name : Build Databend Query Package
63
+ - name : Build Databend Packages
64
64
shell : bash
65
65
run : |
66
- yq -i '.arch = "${{ steps.info.outputs.deb_arch }}"' scripts/distribution/nfpm-query.yaml
67
- yq -i '.version = "${{ steps.info.outputs.deb_version }}"' scripts/distribution/nfpm-query.yaml
68
- pkg_name="databend-query_${{ steps.info.outputs.deb_version }}_${{ steps.info.outputs.deb_arch }}.deb"
69
- nfpm pkg --packager deb -t "distro/${pkg_name}" -f scripts/distribution/nfpm-query.yaml
70
-
71
- - name : Build Databend Meta Package
72
- shell : bash
73
- run : |
74
- yq -i '.arch = "${{ steps.info.outputs.deb_arch }}"' scripts/distribution/nfpm-meta.yaml
75
- yq -i '.version = "${{ steps.info.outputs.deb_version }}"' scripts/distribution/nfpm-meta.yaml
76
- pkg_name="databend-meta_${{ steps.info.outputs.deb_version }}_${{ steps.info.outputs.deb_arch }}.deb"
77
- nfpm pkg --packager deb -t "distro/${pkg_name}" -f scripts/distribution/nfpm-meta.yaml
78
-
79
- - name : Build Databend Debug Package
80
- shell : bash
81
- run : |
82
- yq -i '.arch = "${{ steps.info.outputs.deb_arch }}"' scripts/distribution/nfpm-query-dbg.yaml
83
- yq -i '.version = "${{ steps.info.outputs.deb_version }}"' scripts/distribution/nfpm-query-dbg.yaml
84
- pkg_name="databend-query-dbg_${{ steps.info.outputs.deb_version }}_${{ steps.info.outputs.deb_arch }}.deb"
85
- nfpm pkg --packager deb -t "distro/${pkg_name}" -f scripts/distribution/nfpm-query-dbg.yaml
66
+ pkgs="query meta query-dbg"
67
+ for pkg in $pkgs; do
68
+ yq -i '.arch = "${{ steps.info.outputs.arch }}"' scripts/distribution/nfpm-${pkg}.yaml
69
+ yq -i '.version = "${{ steps.info.outputs.version }}"' scripts/distribution/nfpm-${pkg}.yaml
70
+ nfpm pkg --packager deb --target distro/pkg -f scripts/distribution/nfpm-${pkg}.yaml
71
+ done
72
+ ls -lh distro/pkg
86
73
87
74
- name : Update release to github
88
75
shell : bash
92
79
run : |
93
80
version="${{ inputs.version }}"
94
81
# name looks like: `databend_0.8.144~nightly_amd64.deb`
95
- for pkg in $(ls distro/*.deb); do
82
+ for pkg in $(ls distro/pkg/ *.deb); do
96
83
gh release upload ${version} $pkg --clobber
97
84
done
0 commit comments