You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dr/.woodpecker.yml

40 lines
1.5 KiB

pipeline:
build:
image: rust:1-bullseye
when:
event: tag
commands:
- cargo build --release
buildlinuxaarch64:
image: rust:1-bullseye
when:
event: tag
commands:
- export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
- apt-get update && apt-get install -y gcc-aarch64-linux-gnu
- rustup target add aarch64-unknown-linux-gnu
- cargo build --release --target aarch64-unknown-linux-gnu
buildwinamd64:
image: rust:1-bullseye
when:
event: tag
commands:
- apt-get update && apt-get install -y gcc-mingw-w64
- rustup target add x86_64-pc-windows-gnu
- cargo build --release --target x86_64-pc-windows-gnu
release:
image: rust:1-bullseye
when:
event: tag
secrets: [ gitea_api_key ]
commands:
- curl --user guillem:$GITEA_API_KEY --upload-file target/release/dr https://git.guillemborrell.es/api/packages/guillem/generic/dr/$CI_COMMIT_TAG-linux-amd64/dr
- curl --user guillem:$GITEA_API_KEY --upload-file target/aarch64-unknown-linux-gnu/release/dr https://git.guillemborrell.es/api/packages/guillem/generic/dr/$CI_COMMIT_TAG-linux-aarch64/dr
- curl --user guillem:$GITEA_API_KEY --upload-file target/x86_64-pc-windows-gnu/release/dr.exe https://git.guillemborrell.es/api/packages/guillem/generic/dr/$CI_COMMIT_TAG-win-amd64/dr.exe
publish:
image: rust:1-bullseye
when:
event: tag
secrets: [ cargo_registry_token ]
commands:
- cargo publish --token $CARGO_REGISTRY_TOKEN