mouse/.drone.yml
Jochen Maes b7005e085b
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
fixes typo
Signed-off-by: Jochen Maes <jochen@sejo-it.be>
2023-10-31 07:57:34 +01:00

57 lines
1.8 KiB
YAML

---
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
kind: pipeline
type: docker
name: mouse-release
platform:
arch: amd64
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
- name: artifacts
temp: {}
steps:
- name: build amd64
image: rust:1.73-alpine
commands:
- apk add --no-cache musl-dev gcc-aarch64-none-elf
- mkdir /artifacts/mouse-amd64
- cp LICENSE.txt /artifacts/mouse-amd64/
- mkdir /artifacts/mouse-arm64
- cp LICENSE.txt /artifacts/mouse-arm64/
- rustup target add x86_64-unknown-linux-musl
- rustup target add aarch64-unknown-linux-musl
- cargo build --target x86_64-unknown-linux-musl --bins -r --config 'package.version="${DRONE_TAG##v}"'
- cargo build --target aarch64-unknown-linux-musl --bins -r --config 'package.version="${DRONE_TAG##v}"'
- cp target/x86_64-unknown-linux-musl/release/mouse /artifacts/mouse-amd64/mouse
- cp target/aarch64-unknown-linux-musl/release/mouse /artifacts/mouse-arm64/mouse-arm64
- cd /artifacts && tar -cvzf mouse-amd64.tar.gz mouse-amd64/*
- cd /artifacts && tar -cvzf mouse-arm64.tar.gz mouse-arm64/*
environment:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: /usr/bin/aarch64-none-elf-gcc
volumes:
- name: artifacts
path: /artifacts/
- name: create gitea release amd64
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_api_key
base_url: https://gitea.sejo-it.be
checksum: sha256
files: /artifacts/*.tar.gz
volumes:
- name: artifacts
path: /artifacts/
when:
event:
- tag