kind: pipeline name: default volumes: - name: target temp: {} steps: # - name: build_test # image: drone_rust:1.50-musl # volumes: # - name: target # path: /drone/src/target # commands: # - cargo build --release - name: run_test 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/ when: event: tag - name: deploy image: plugins/gitea-release volumes: - name: target path: /drone/src/target settings: api_key: from_secret: GITEA_TOKEN base_url: https://git.solarautonomie.de title: target/VERSION note: CHANGELOG.md files: - /drone/src/target/s0-meter_* - /drone/src/bundle/* checksum: md5 prerelease: true # You can change this in Gitea afterwards draft: true # You can change this in Gitea afterwards when: event: tag