2023-06-30 13:32:17 +02:00
|
|
|
when:
|
2024-07-14 22:59:45 +02:00
|
|
|
- event: tag
|
|
|
|
- event: pull_request
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
2024-11-05 16:56:40 +02:00
|
|
|
path:
|
|
|
|
- Makefile
|
|
|
|
- .woodpecker/binaries.yaml
|
2023-06-30 13:32:17 +02:00
|
|
|
|
2022-07-17 18:25:56 +02:00
|
|
|
variables:
|
2024-09-05 11:53:05 +02:00
|
|
|
- &golang_image 'docker.io/golang:1.23'
|
2024-10-20 11:19:18 +02:00
|
|
|
- &node_image 'docker.io/node:23-alpine'
|
2024-11-08 01:44:50 +02:00
|
|
|
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.23.x'
|
2022-07-17 18:25:56 +02:00
|
|
|
|
2024-07-14 22:59:45 +02:00
|
|
|
# cspell:words bindata netgo
|
2024-05-24 22:35:04 +02:00
|
|
|
|
2023-06-30 13:32:17 +02:00
|
|
|
steps:
|
2022-06-16 23:55:17 +02:00
|
|
|
build-web:
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *node_image
|
2022-10-25 14:51:29 +02:00
|
|
|
directory: web/
|
2022-01-29 14:58:55 +02:00
|
|
|
commands:
|
2022-10-08 16:15:07 +02:00
|
|
|
- corepack enable
|
|
|
|
- pnpm install --frozen-lockfile
|
|
|
|
- pnpm build
|
2022-01-29 14:58:55 +02:00
|
|
|
|
2022-06-17 01:57:02 +02:00
|
|
|
vendor:
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *golang_image
|
2022-06-17 01:57:02 +02:00
|
|
|
commands:
|
|
|
|
- go mod vendor
|
|
|
|
|
2023-07-18 18:46:27 +02:00
|
|
|
cross-compile-server:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
|
|
|
- build-web
|
2023-07-18 18:46:27 +02:00
|
|
|
image: *xgo_image
|
|
|
|
pull: true
|
2022-01-29 14:58:55 +02:00
|
|
|
commands:
|
2023-07-18 18:46:27 +02: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
|
2024-07-14 22:59:45 +02:00
|
|
|
ARCHIVE_IT: '1'
|
2022-01-29 14:58:55 +02:00
|
|
|
|
2024-01-21 23:18:20 +02:00
|
|
|
build-tarball:
|
|
|
|
depends_on:
|
2024-01-21 23:40:51 +02:00
|
|
|
- vendor
|
2024-01-21 23:18:20 +02:00
|
|
|
- build-web
|
|
|
|
image: *golang_image
|
|
|
|
commands:
|
|
|
|
- make build-tarball
|
|
|
|
|
2022-01-29 14:58:55 +02:00
|
|
|
build-agent:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *golang_image
|
2022-01-29 14:58:55 +02:00
|
|
|
commands:
|
2024-07-14 22:59:45 +02:00
|
|
|
- apt update
|
|
|
|
- apt install -y zip
|
2022-01-29 14:58:55 +02:00
|
|
|
- make release-agent
|
|
|
|
|
|
|
|
build-cli:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *golang_image
|
2022-01-29 14:58:55 +02:00
|
|
|
commands:
|
2024-07-14 22:59:45 +02:00
|
|
|
- apt update
|
|
|
|
- apt install -y zip
|
2022-01-29 14:58:55 +02:00
|
|
|
- make release-cli
|
|
|
|
|
|
|
|
build-deb-rpm:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- cross-compile-server
|
|
|
|
- build-agent
|
|
|
|
- build-cli
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *golang_image
|
2022-01-29 14:58:55 +02:00
|
|
|
commands:
|
|
|
|
- make bundle
|
|
|
|
|
|
|
|
checksums:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- cross-compile-server
|
|
|
|
- build-agent
|
|
|
|
- build-cli
|
|
|
|
- build-deb-rpm
|
2024-01-21 23:18:20 +02:00
|
|
|
- build-tarball
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *golang_image
|
2022-01-29 14:58:55 +02:00
|
|
|
commands:
|
|
|
|
- make release-checksums
|
|
|
|
|
|
|
|
release-dryrun:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- checksums
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *golang_image
|
2022-01-29 14:58:55 +02:00
|
|
|
commands:
|
2023-10-24 14:42:05 +02:00
|
|
|
- ls -la dist/*.*
|
|
|
|
- cat dist/checksums.txt
|
2022-01-29 14:58:55 +02:00
|
|
|
|
|
|
|
release:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- checksums
|
2024-10-05 12:06:45 +02:00
|
|
|
image: woodpeckerci/plugin-release:0.2.1
|
2022-01-29 14:58:55 +02:00
|
|
|
settings:
|
2024-04-18 17:16:16 +02:00
|
|
|
api_key:
|
|
|
|
from_secret: github_token
|
2022-01-29 14:58:55 +02:00
|
|
|
files:
|
|
|
|
- dist/*.tar.gz
|
2024-07-14 22:59:45 +02:00
|
|
|
- dist/*.zip
|
2022-01-29 14:58:55 +02:00
|
|
|
- dist/*.deb
|
|
|
|
- dist/*.rpm
|
|
|
|
- dist/checksums.txt
|
|
|
|
title: ${CI_COMMIT_TAG##v}
|
2024-07-14 22:59:45 +02:00
|
|
|
when:
|
|
|
|
event: tag
|