dr/.woodpecker.yml
Guillem Borrell 978afec7f4
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
exe for windows
2022-12-02 18:44:19 +00:00

40 lines
1.5 KiB
YAML

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