woodpecker/.woodpecker/binaries.yaml
Patrick Schratz 4d2610c22e
Allow running tests on arm64 runners (#2605)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <m.huber@kithara.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-04-30 12:51:25 +02:00

104 lines
2 KiB
YAML

when:
event: tag
variables:
- &golang_image 'docker.io/golang:1.22.2'
- &node_image 'docker.io/node:22-alpine'
# TODO: switch back to upstream image after https://github.com/techknowlogick/xgo/pull/224 got merged
- &xgo_image 'docker.io/pats22/xgo:go-1.22.1'
- &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
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:
- vendor
- 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: woodpeckerci/plugin-github-release:1.1.2
settings:
api_key:
from_secret: github_token
files:
- dist/*.tar.gz
- dist/*.deb
- dist/*.rpm
- dist/checksums.txt
title: ${CI_COMMIT_TAG##v}