woodpecker/.woodpecker/binaries.yaml
6543 9e862ae44b
Build tarball for distribution packages (#3244)
close  #3219

and also make sure the `binaries` & `docker` workflow will run on tag
events, see https://ci.woodpecker-ci.org/repos/3780/pipeline/12358
2024-01-21 22:18:20 +01:00

111 lines
2.1 KiB
YAML

when:
event: tag
variables:
- &golang_image 'docker.io/golang:1.21.6'
- &node_image 'docker.io/node:21-alpine'
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.21.5'
- &xgo_version 'go-1.21.2'
steps:
build-web:
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm install --frozen-lockfile
- pnpm build
vendor:
image: *golang_image
commands:
- go mod vendor
code-gen:
image: *golang_image
depends_on:
- vendor
commands:
- make generate
cross-compile-server:
depends_on:
- vendor
- build-web
image: *xgo_image
pull: true
commands:
- 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'
build-tarball:
depends_on:
- code-gen
- build-web
image: *golang_image
commands:
- make build-tarball
build-agent:
depends_on:
- vendor
image: *golang_image
commands:
- make release-agent
build-cli:
depends_on:
- vendor
image: *golang_image
commands:
- make release-cli
build-deb-rpm:
depends_on:
- cross-compile-server
- build-agent
- build-cli
image: *golang_image
commands:
- make bundle
checksums:
depends_on:
- cross-compile-server
- build-agent
- build-cli
- build-deb-rpm
- build-tarball
image: *golang_image
commands:
- make release-checksums
release-dryrun:
depends_on:
- checksums
image: *golang_image
commands:
- ls -la dist/*.*
- cat dist/checksums.txt
release:
depends_on:
- checksums
image: docker.io/plugins/github-release
secrets:
- source: github_token
target: github_release_api_key
settings:
files:
- dist/*.tar.gz
- dist/*.deb
- dist/*.rpm
- dist/checksums.txt
title: ${CI_COMMIT_TAG##v}