2023-06-30 11:32:17 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
2022-07-17 16:25:56 +00:00
|
|
|
variables:
|
2024-04-08 05:54:28 +00:00
|
|
|
- &golang_image 'docker.io/golang:1.22.2'
|
2024-04-28 09:14:03 +00:00
|
|
|
- &node_image 'docker.io/node:22-alpine'
|
2024-05-04 11:58:14 +00:00
|
|
|
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.22.2'
|
2023-10-09 07:11:08 +00:00
|
|
|
- &xgo_version 'go-1.21.2'
|
2022-07-17 16:25:56 +00:00
|
|
|
|
2023-06-30 11:32:17 +00:00
|
|
|
steps:
|
2022-06-16 21:55:17 +00:00
|
|
|
build-web:
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *node_image
|
2022-10-25 12:51:29 +00:00
|
|
|
directory: web/
|
2022-01-29 12:58:55 +00:00
|
|
|
commands:
|
2022-10-08 14:15:07 +00:00
|
|
|
- corepack enable
|
|
|
|
- pnpm install --frozen-lockfile
|
|
|
|
- pnpm build
|
2022-01-29 12:58:55 +00:00
|
|
|
|
2022-06-16 23:57:02 +00:00
|
|
|
vendor:
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *golang_image
|
2022-06-16 23:57:02 +00:00
|
|
|
commands:
|
|
|
|
- go mod vendor
|
|
|
|
|
2023-07-18 16:46:27 +00:00
|
|
|
cross-compile-server:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
|
|
|
- build-web
|
2023-07-18 16:46:27 +00:00
|
|
|
image: *xgo_image
|
|
|
|
pull: true
|
2022-01-29 12:58:55 +00:00
|
|
|
commands:
|
2023-07-18 16:46:27 +00:00
|
|
|
- apt update
|
|
|
|
- apt install -y tree
|
|
|
|
- make cross-compile-server
|
|
|
|
environment:
|
|
|
|
PLATFORMS: linux|arm64/v8;linux|amd64;windows|amd64
|
|
|
|
TAGS: bindata sqlite sqlite_unlock_notify netgo
|
|
|
|
XGO_VERSION: *xgo_version
|
|
|
|
TARGZ: '1'
|
2022-01-29 12:58:55 +00:00
|
|
|
|
2024-01-21 21:18:20 +00:00
|
|
|
build-tarball:
|
|
|
|
depends_on:
|
2024-01-21 21:40:51 +00:00
|
|
|
- vendor
|
2024-01-21 21:18:20 +00:00
|
|
|
- build-web
|
|
|
|
image: *golang_image
|
|
|
|
commands:
|
|
|
|
- make build-tarball
|
|
|
|
|
2022-01-29 12:58:55 +00:00
|
|
|
build-agent:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *golang_image
|
2022-01-29 12:58:55 +00:00
|
|
|
commands:
|
|
|
|
- make release-agent
|
|
|
|
|
|
|
|
build-cli:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *golang_image
|
2022-01-29 12:58:55 +00:00
|
|
|
commands:
|
|
|
|
- make release-cli
|
|
|
|
|
|
|
|
build-deb-rpm:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
|
|
|
- cross-compile-server
|
|
|
|
- build-agent
|
|
|
|
- build-cli
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *golang_image
|
2022-01-29 12:58:55 +00:00
|
|
|
commands:
|
|
|
|
- make bundle
|
|
|
|
|
|
|
|
checksums:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
|
|
|
- cross-compile-server
|
|
|
|
- build-agent
|
|
|
|
- build-cli
|
|
|
|
- build-deb-rpm
|
2024-01-21 21:18:20 +00:00
|
|
|
- build-tarball
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *golang_image
|
2022-01-29 12:58:55 +00:00
|
|
|
commands:
|
|
|
|
- make release-checksums
|
|
|
|
|
|
|
|
release-dryrun:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
|
|
|
- checksums
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *golang_image
|
2022-01-29 12:58:55 +00:00
|
|
|
commands:
|
2023-10-24 12:42:05 +00:00
|
|
|
- ls -la dist/*.*
|
|
|
|
- cat dist/checksums.txt
|
2022-01-29 12:58:55 +00:00
|
|
|
|
|
|
|
release:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
|
|
|
- checksums
|
2024-04-18 15:16:16 +00:00
|
|
|
image: woodpeckerci/plugin-github-release:1.1.2
|
2022-01-29 12:58:55 +00:00
|
|
|
settings:
|
2024-04-18 15:16:16 +00:00
|
|
|
api_key:
|
|
|
|
from_secret: github_token
|
2022-01-29 12:58:55 +00:00
|
|
|
files:
|
|
|
|
- dist/*.tar.gz
|
|
|
|
- dist/*.deb
|
|
|
|
- dist/*.rpm
|
|
|
|
- dist/checksums.txt
|
|
|
|
title: ${CI_COMMIT_TAG##v}
|