ci: upload zip for windows build
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
鲁树人 2024-10-21 06:10:36 +09:00
parent 57c1aa3e54
commit d4d5e5ddf4
2 changed files with 6 additions and 4 deletions

View File

@ -44,7 +44,9 @@ local StepGoBuild(GOOS, GOARCH) = {
};
local StepUploadArtifact(GOOS, GOARCH) = {
local filename = 'um-%s-%s.tar.gz' % [GOOS, GOARCH],
local windows = GOOS == 'windows',
local archiveExt = if windows then 'zip' else 'tar.gz',
local filename = 'um-%s-%s.%s' % [GOOS, GOARCH, archiveExt],
local filepath = 'dist/%s' % filename,
local pkgname = '${DRONE_REPO_NAME}-build',

View File

@ -62,9 +62,9 @@ steps:
image: golang:1.22
name: go build windows/amd64
- commands:
- curl --fail --include --user "um-release-bot:$GITEA_API_KEY" --upload-file "dist/um-windows-amd64.tar.gz"
"$DRONE_GITEA_SERVER/api/packages/${DRONE_REPO_NAMESPACE}/generic/${DRONE_REPO_NAME}-build/${DRONE_BUILD_NUMBER}/um-windows-amd64.tar.gz"
- sha256sum dist/um-windows-amd64.tar.gz
- curl --fail --include --user "um-release-bot:$GITEA_API_KEY" --upload-file "dist/um-windows-amd64.zip"
"$DRONE_GITEA_SERVER/api/packages/${DRONE_REPO_NAMESPACE}/generic/${DRONE_REPO_NAME}-build/${DRONE_BUILD_NUMBER}/um-windows-amd64.zip"
- sha256sum dist/um-windows-amd64.zip
- echo $DRONE_GITEA_SERVER/${DRONE_REPO_NAMESPACE}/-/packages/generic/${DRONE_REPO_NAME}-build/${DRONE_BUILD_NUMBER}
environment:
DRONE_GITEA_SERVER: https://git.unlock-music.dev