|
|
|
@ -17,7 +17,8 @@ steps:
|
|
|
|
|
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-linux-amd64.tar.gz"
|
|
|
|
|
- tar -c -C $DIST_DIR um | gzip -9 > "dist/um-linux-amd64-$(git describe --tags
|
|
|
|
|
--always).tar.gz"
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: amd64
|
|
|
|
|
GOOS: linux
|
|
|
|
@ -25,9 +26,10 @@ steps:
|
|
|
|
|
image: golang:1.22
|
|
|
|
|
name: go build linux/amd64
|
|
|
|
|
- commands:
|
|
|
|
|
- curl --fail --include --user "um-release-bot:$GITEA_API_KEY" --upload-file "dist/um-linux-amd64.tar.gz"
|
|
|
|
|
"$DRONE_GITEA_SERVER/api/packages/${DRONE_REPO_NAMESPACE}/generic/${DRONE_REPO_NAME}-build/${DRONE_BUILD_NUMBER}/um-linux-amd64.tar.gz"
|
|
|
|
|
- sha256sum dist/um-linux-amd64.tar.gz
|
|
|
|
|
- curl --fail --include --user "um-release-bot:$GITEA_API_KEY" --upload-file "dist/um-linux-amd64-$(git
|
|
|
|
|
describe --tags --always).tar.gz" "$DRONE_GITEA_SERVER/api/packages/${DRONE_REPO_NAMESPACE}/generic/${DRONE_REPO_NAME}-build/${DRONE_BUILD_NUMBER}/um-linux-amd64-$(git
|
|
|
|
|
describe --tags --always).tar.gz"
|
|
|
|
|
- sha256sum dist/um-linux-amd64-$(git describe --tags --always).tar.gz
|
|
|
|
|
- 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
|
|
|
|
@ -54,7 +56,7 @@ steps:
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- command -v zip >/dev/null || (apt update && apt install -y zip)
|
|
|
|
|
- zip -9 -j -r "dist/um-windows-amd64.zip" $DIST_DIR
|
|
|
|
|
- zip -9 -j -r "dist/um-windows-amd64-$(git describe --tags --always).zip" $DIST_DIR
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: amd64
|
|
|
|
|
GOOS: windows
|
|
|
|
@ -62,9 +64,10 @@ 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.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
|
|
|
|
|
- curl --fail --include --user "um-release-bot:$GITEA_API_KEY" --upload-file "dist/um-windows-amd64-$(git
|
|
|
|
|
describe --tags --always).zip" "$DRONE_GITEA_SERVER/api/packages/${DRONE_REPO_NAMESPACE}/generic/${DRONE_REPO_NAME}-build/${DRONE_BUILD_NUMBER}/um-windows-amd64-$(git
|
|
|
|
|
describe --tags --always).zip"
|
|
|
|
|
- sha256sum dist/um-windows-amd64-$(git describe --tags --always).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
|
|
|
|
@ -90,7 +93,8 @@ steps:
|
|
|
|
|
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-darwin-amd64.tar.gz"
|
|
|
|
|
- tar -c -C $DIST_DIR um | gzip -9 > "dist/um-darwin-amd64-$(git describe --tags
|
|
|
|
|
--always).tar.gz"
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: amd64
|
|
|
|
|
GOOS: darwin
|
|
|
|
@ -98,9 +102,10 @@ steps:
|
|
|
|
|
image: golang:1.22
|
|
|
|
|
name: go build darwin/amd64
|
|
|
|
|
- commands:
|
|
|
|
|
- curl --fail --include --user "um-release-bot:$GITEA_API_KEY" --upload-file "dist/um-darwin-amd64.tar.gz"
|
|
|
|
|
"$DRONE_GITEA_SERVER/api/packages/${DRONE_REPO_NAMESPACE}/generic/${DRONE_REPO_NAME}-build/${DRONE_BUILD_NUMBER}/um-darwin-amd64.tar.gz"
|
|
|
|
|
- sha256sum dist/um-darwin-amd64.tar.gz
|
|
|
|
|
- curl --fail --include --user "um-release-bot:$GITEA_API_KEY" --upload-file "dist/um-darwin-amd64-$(git
|
|
|
|
|
describe --tags --always).tar.gz" "$DRONE_GITEA_SERVER/api/packages/${DRONE_REPO_NAMESPACE}/generic/${DRONE_REPO_NAME}-build/${DRONE_BUILD_NUMBER}/um-darwin-amd64-$(git
|
|
|
|
|
describe --tags --always).tar.gz"
|
|
|
|
|
- sha256sum dist/um-darwin-amd64-$(git describe --tags --always).tar.gz
|
|
|
|
|
- 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
|
|
|
|
@ -132,7 +137,8 @@ steps:
|
|
|
|
|
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-linux-amd64.tar.gz"
|
|
|
|
|
- tar -c -C $DIST_DIR um | gzip -9 > "dist/um-linux-amd64-$(git describe --tags
|
|
|
|
|
--always).tar.gz"
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: amd64
|
|
|
|
|
GOOS: linux
|
|
|
|
@ -144,7 +150,8 @@ steps:
|
|
|
|
|
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-linux-arm64.tar.gz"
|
|
|
|
|
- tar -c -C $DIST_DIR um | gzip -9 > "dist/um-linux-arm64-$(git describe --tags
|
|
|
|
|
--always).tar.gz"
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: arm64
|
|
|
|
|
GOOS: linux
|
|
|
|
@ -156,7 +163,7 @@ steps:
|
|
|
|
|
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-linux-386.tar.gz"
|
|
|
|
|
- tar -c -C $DIST_DIR um | gzip -9 > "dist/um-linux-386-$(git describe --tags --always).tar.gz"
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: "386"
|
|
|
|
|
GOOS: linux
|
|
|
|
@ -169,7 +176,7 @@ steps:
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- command -v zip >/dev/null || (apt update && apt install -y zip)
|
|
|
|
|
- zip -9 -j -r "dist/um-windows-amd64.zip" $DIST_DIR
|
|
|
|
|
- zip -9 -j -r "dist/um-windows-amd64-$(git describe --tags --always).zip" $DIST_DIR
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: amd64
|
|
|
|
|
GOOS: windows
|
|
|
|
@ -182,7 +189,7 @@ steps:
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- command -v zip >/dev/null || (apt update && apt install -y zip)
|
|
|
|
|
- zip -9 -j -r "dist/um-windows-arm64.zip" $DIST_DIR
|
|
|
|
|
- zip -9 -j -r "dist/um-windows-arm64-$(git describe --tags --always).zip" $DIST_DIR
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: arm64
|
|
|
|
|
GOOS: windows
|
|
|
|
@ -195,7 +202,7 @@ steps:
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- command -v zip >/dev/null || (apt update && apt install -y zip)
|
|
|
|
|
- zip -9 -j -r "dist/um-windows-386.zip" $DIST_DIR
|
|
|
|
|
- zip -9 -j -r "dist/um-windows-386-$(git describe --tags --always).zip" $DIST_DIR
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: "386"
|
|
|
|
|
GOOS: windows
|
|
|
|
@ -207,7 +214,8 @@ steps:
|
|
|
|
|
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-darwin-amd64.tar.gz"
|
|
|
|
|
- tar -c -C $DIST_DIR um | gzip -9 > "dist/um-darwin-amd64-$(git describe --tags
|
|
|
|
|
--always).tar.gz"
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: amd64
|
|
|
|
|
GOOS: darwin
|
|
|
|
@ -219,13 +227,18 @@ steps:
|
|
|
|
|
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
|
|
|
|
|
--always)" -o $DIST_DIR ./cmd/um
|
|
|
|
|
- mkdir -p dist
|
|
|
|
|
- tar -zc -C $DIST_DIR um | gzip -9 > "dist/um-darwin-arm64.tar.gz"
|
|
|
|
|
- tar -c -C $DIST_DIR um | gzip -9 > "dist/um-darwin-arm64-$(git describe --tags
|
|
|
|
|
--always).tar.gz"
|
|
|
|
|
environment:
|
|
|
|
|
GOARCH: arm64
|
|
|
|
|
GOOS: darwin
|
|
|
|
|
GOPROXY: https://goproxy.io,direct
|
|
|
|
|
image: golang:1.22
|
|
|
|
|
name: go build darwin/arm64
|
|
|
|
|
- commands:
|
|
|
|
|
- mv dist/*.tar.gz dist/*.zip ./
|
|
|
|
|
image: golang:1.22
|
|
|
|
|
name: prepare root
|
|
|
|
|
- image: plugins/gitea-release
|
|
|
|
|
name: create release
|
|
|
|
|
settings:
|
|
|
|
@ -234,7 +247,9 @@ steps:
|
|
|
|
|
base_url: https://git.unlock-music.dev
|
|
|
|
|
checksum: sha256
|
|
|
|
|
draft: true
|
|
|
|
|
files: dist/*
|
|
|
|
|
files:
|
|
|
|
|
- um-*.tar.gz
|
|
|
|
|
- um-*.zip
|
|
|
|
|
title: ${DRONE_TAG}
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|