merge into main (#1)
Co-authored-by: Daniel Tomlinson <dtomlinson@panaetius.co.uk> Reviewed-on: https://git.panaetius.co.uk/unraid-plugins/exa/pulls/1
This commit is contained in:
71
.drone.yml
Normal file
71
.drone.yml
Normal file
@@ -0,0 +1,71 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
concurrency:
|
||||
limit: 1
|
||||
|
||||
steps:
|
||||
- name: checkout submodule
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
- name: checkout tag
|
||||
image: alpine/git
|
||||
commands:
|
||||
- cd exa
|
||||
- git fetch --all --tags
|
||||
- git checkout tags/${DRONE_TAG}
|
||||
- name: cargo build
|
||||
image: rust:latest
|
||||
commands:
|
||||
- cd exa
|
||||
- cargo build --release --target x86_64-unknown-linux-gnu
|
||||
- cd target/x86_64-unknown-linux-gnu/release
|
||||
- name: verify
|
||||
image: rust:latest
|
||||
commands:
|
||||
- exa/target/x86_64-unknown-linux-gnu/release/exa --long --icons
|
||||
- name: build slackware package
|
||||
image: vbatts/slackware:14.2
|
||||
commands:
|
||||
- mkdir -p dist/usr/sbin
|
||||
- cp exa/target/x86_64-unknown-linux-gnu/release/exa ./dist/usr/sbin/exa
|
||||
- cp -R ./usr ./dist
|
||||
- chmod +x ./dist/usr/sbin/exa
|
||||
- cd dist
|
||||
- makepkg -l y -c y ../exa-${DRONE_TAG}.txz
|
||||
- name: prepare release
|
||||
image: vbatts/slackware:14.2
|
||||
commands:
|
||||
- echo "exa ${DRONE_TAG} - built@$(date '+%FT%TZ') [Drone ${DRONE_SYSTEM_VERSION}]" > ./release_note
|
||||
- cat ./release_note
|
||||
- name: publish release
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: GITEA_KEY
|
||||
base_url: https://git.panaetius.co.uk
|
||||
files:
|
||||
- ./exa-${DRONE_TAG}.txz
|
||||
checksum:
|
||||
- md5
|
||||
title: ${DRONE_TAG}
|
||||
note: ./release_note
|
||||
file_exists: "skip"
|
||||
when:
|
||||
event: tag
|
||||
- name: slack
|
||||
image: plugins/slack
|
||||
settings:
|
||||
webhook:
|
||||
from_secret: BUILD_STATUS_SLACK_WEBHOOK
|
||||
username: drone
|
||||
when:
|
||||
status:
|
||||
- "success"
|
||||
- "failure"
|
||||
Reference in New Issue
Block a user