60 lines
1.8 KiB
YAML
60 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
|
|
- cargo build --target aarch64-unknown-linux-musl --bins -r
|
|
- 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_PKG_VERSION: ${DRONE_TAG##v}
|
|
CARGO_PKG_LICENSE: "Mozilla Public License Version 2.0"
|
|
CARGO_PKG_LICENSE_FILE: LICENSE.txt
|
|
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
|