39 lines
1.4 KiB
YAML
39 lines
1.4 KiB
YAML
pipeline:
|
|
build:
|
|
image: rust:1-bullseye
|
|
when:
|
|
event: tag
|
|
commands:
|
|
- cargo build --release
|
|
buildlinuxaarch64:
|
|
image: rust:1-bullseye
|
|
when:
|
|
event: tag
|
|
commands:
|
|
- apt-get update && apt-get install -y gcc-12-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-base
|
|
- 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/dr-linux-amd64
|
|
- 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/dr-linux-aarch64
|
|
- curl --user guillem:$GITEA_API_KEY --upload-file target/x86_64-pc-windows-gnu/release/dr https://git.guillemborrell.es/api/packages/guillem/generic/dr/$CI_COMMIT_TAG/dr-win-amd64
|
|
publish:
|
|
image: rust:1-bullseye
|
|
when:
|
|
event: tag
|
|
secrets: [ cargo_registry_token ]
|
|
commands:
|
|
- cargo publish --token $CARGO_REGISTRY_TOKEN |