s0-meter/.drone.yml

67 lines
1.6 KiB
YAML
Raw Permalink Normal View History

2021-03-08 00:25:14 +01:00
kind: pipeline
2021-03-08 00:46:13 +01:00
name: default
2021-03-08 00:25:14 +01:00
volumes:
- name: target
temp: {}
2021-03-08 01:23:34 +01:00
steps:
# - name: build_test
# image: drone_rust:1.50-musl
# volumes:
# - name: target
# path: /drone/src/target
# commands:
# - cargo build --release
2021-03-08 01:23:34 +01:00
- name: run_test
2021-03-13 15:11:49 +01:00
image: drone_rust:1.50-musl
volumes:
- name: target
path: /drone/src/target
commands:
- cargo test --release --no-fail-fast -- --test-threads 1
- name: build_release
image: drone_rust:1.50-musl
volumes:
- name: target
path: /drone/src/target
commands:
- cargo build --release --target armv7-unknown-linux-musleabihf --features "rppal"
when:
event: tag
- name: prepare_deployment
image: alpine
volumes:
- name: target
path: /drone/src/target
commands:
- grep '^version = ' Cargo.toml | cut -f2 -d\" > target/VERSION
- cat target/VERSION
- cp target/armv7-unknown-linux-musleabihf/release/s0-meter target/s0-meter_$(cat target/VERSION)_armhf
- cp bundle/* target/
2021-03-13 15:22:02 +01:00
when:
event: tag
- name: deploy
image: plugins/gitea-release
volumes:
- name: target
path: /drone/src/target
settings:
api_key:
from_secret: GITEA_TOKEN
2021-03-14 17:02:33 +01:00
base_url: https://git.solarautonomie.de
2021-03-14 21:18:12 +01:00
title: target/VERSION
2021-03-13 16:15:04 +01:00
note: CHANGELOG.md
files:
- /drone/src/target/s0-meter_*
- /drone/src/bundle/*
2021-03-14 21:18:12 +01:00
checksum: md5
2021-03-14 17:02:33 +01:00
prerelease: true # You can change this in Gitea afterwards
draft: true # You can change this in Gitea afterwards
when:
event: tag