---
kind: pipeline
name: default
steps:
- name: build
image: xoxys/rpmbuild
pull: always
environment:
CUPSRELEASE: "${DRONE_TAG##v}"
commands:
- wget https://github.com/apple/cups/releases/download/v${CUPSRELEASE:-2.2.10}/cups-${CUPSRELEASE:-2.2.10}-source.tar.gz
- mkdir ./rpms
- rpmbuild -ta --define "_rpmdir $(pwd)/rpms" --without libusb1 cups-${CUPSRELEASE:-2.2.10}-source.tar.gz
when:
event:
- push
- tag
- name: checksum
image: alpine
- apk add --no-cache coreutils
- sha256sum -b rpms/x86_64/* > sha256sum.txt
- name: gpgsign
image: plugins/gpgsign:1
settings:
key:
from_secret: gpgsign_key
passphrase:
from_secret: gpgsign_passphrase
detach_sign: true
files:
- rpms/x86_64/*
- name: publish
image: plugins/gitea-release
base_url: https://gitea.rknet.org
api_key:
from_secret: gitea_token
- sha256sum.txt
title: "${DRONE_TAG}"
- name: notify
image: plugins/matrix
homeserver: https://matrix.rknet.org
roomid: MtidqQXWWAtQcByBhH:rknet.org
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
username:
from_secret: matrix_username
password:
from_secret: matrix_password
status:
- success
- failure