ci: upload zip for windows build

main
鲁树人 2 months ago
parent 57c1aa3e54
commit d4d5e5ddf4

@ -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',

@ -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

Loading…
Cancel
Save