1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-12 06:00:25 +08:00

TUN-9803: Add windows builds to gitlab-ci

This commit is contained in:
João "Pisco" Fernandes
2025-09-04 15:59:44 +01:00
parent 9e6d58aaea
commit d9e13ab2ab
19 changed files with 443 additions and 216 deletions

23
.ci/scripts/package-windows.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
python3 -m venv env
. env/bin/activate
pip install pynacl==1.4.0 pygithub==1.55
VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*")
echo $VERSION
export TARGET_OS=windows
# This controls the directory the built artifacts go into
export BUILT_ARTIFACT_DIR=artifacts/
export FINAL_ARTIFACT_DIR=artifacts/
mkdir -p $BUILT_ARTIFACT_DIR
mkdir -p $FINAL_ARTIFACT_DIR
windowsArchs=("amd64" "386")
for arch in ${windowsArchs[@]}; do
export TARGET_ARCH=$arch
# Copy .exe from artifacts directory
cp $BUILT_ARTIFACT_DIR/cloudflared-windows-$arch.exe ./cloudflared.exe
make cloudflared-msi
# Copy msi into final directory
mv cloudflared-$VERSION-$arch.msi $FINAL_ARTIFACT_DIR/cloudflared-windows-$arch.msi
done