diff --git a/.drone.env b/.drone.env
new file mode 100644
index 0000000..92bd0e4
--- /dev/null
+++ b/.drone.env
@@ -0,0 +1,2 @@
+# renovate: datasource=github-releases depName=OpenPrinting/cups
+export CUPS_VERSION="${CUPS_VERSION:-v2.3.3op1}"
diff --git a/.drone.yml b/.drone.yml
index 833905c..9628930 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -7,62 +7,54 @@ platform:
arch: amd64
steps:
-- name: build
- image: thegeeklab/rpmbuild
- commands:
- - "[ -z \"$BUILD_VERSION\" ] && BUILD_VERSION=2.3.3"
- - wget -q https://github.com/apple/cups/releases/download/v$BUILD_VERSION/cups-$BUILD_VERSION-source.tar.gz
- - rpmbuild -ta --without libusb1 cups-$BUILD_VERSION-source.tar.gz
- environment:
- BUILD_VERSION: ${DRONE_TAG##v}
+ - name: build
+ image: thegeeklab/rpmbuild
+ commands:
+ - source .drone.env
+ - wget -q https://github.com/OpenPrinting/cups/releases/download/v$CUPS_VERSION/cups-v$CUPS_VERSION-source.tar.gz
+ - rpmbuild -ta --without libusb1 cups-${CUPS_VERSION##v}-source.tar.gz
-- name: checksum
- image: alpine
- commands:
- - apk add --no-cache coreutils
- - sha256sum -b dist/RPMS/x86_64/* > dist/sha256sum.txt
+ - name: checksum
+ image: thegee
+ commands:
+ - cd /drone/src/dist/RPMS/x86_64/ && sha256sum * > /drone/src/dist/sha256sum.txt
-- name: gpgsign
- pull: always
- image: plugins/gpgsign:1
- settings:
- detach_sign: true
- files:
- - dist/RPMS/x86_64/*
- key:
- from_secret: gpgsign_key
- passphrase:
- from_secret: gpgsign_passphrase
+ - name: changelog-generate
+ image: thegeeklab/git-chglog
+ commands:
+ - git fetch -tq
+ - git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
+ depends_on:
+ - tags
-- name: release
- image: plugins/gitea-release
- settings:
- api_key:
- from_secret: gitea_token
- base_url: https://gitea.rknet.org
- files:
- - dist/RPMS/x86_64/*
- - dist/sha256sum.txt
- title: ${DRONE_TAG}
- when:
- ref:
- - refs/tags/**
+ - name: changelog-format
+ image: thegeeklab/alpine-tools
+ commands:
+ - prettier CHANGELOG.md
+ - prettier -w CHANGELOG.md
+ depends_on:
+ - changelog-generate
-- name: repository
- image: plugins/s3
- settings:
- access_key:
- from_secret: s3_access_key
- bucket: packages
- endpoint: https://sp.rknet.org
- path_style: true
- secret_key:
- from_secret: s3_secret_access_key
- source: dist/RPMS/x86_64/*.rpm
- strip_prefix: dist/RPMS/
- target: /centos/7/
- when:
- ref:
+ - name: publish-gitea
+ image: plugins/gitea-release
+ settings:
+ api_key:
+ from_secret: gitea_token
+ base_url: https://gitea.rknet.org
+ files:
+ - /drone/src/dist/RPMS/x86_64/*
+ - /drone/src/dist/sha256sum.txt
+ note: CHANGELOG.md
+ overwrite: true
+ title: ${DRONE_TAG}
+ when:
+ ref:
+ - refs/tags/**
+
+trigger:
+ ref:
+ - refs/heads/main
+ - refs/pull/**
- refs/tags/**
---
@@ -74,32 +66,36 @@ platform:
arch: amd64
steps:
-- name: matrix
- image: plugins/matrix
- settings:
- homeserver:
- from_secret: matrix_homeserver
- password:
- from_secret: matrix_password
- roomid:
- from_secret: matrix_roomid
- template: "Status: **{{ build.status }}**
Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}
Message: {{ build.message }}"
- username:
- from_secret: matrix_username
+ - name: matrix
+ image: thegeeklab/drone-matrix
+ settings:
+ homeserver:
+ from_secret: matrix_homeserver
+ password:
+ from_secret: matrix_password
+ roomid:
+ from_secret: matrix_roomid
+ template: "Status: **{{ build.Status }}**
Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.Link }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}
Message: {{ commit.Message.Title }}"
+ username:
+ from_secret: matrix_username
+ when:
+ status:
+ - success
+ - failure
trigger:
ref:
- - refs/heads/master
- - refs/tags/**
+ - refs/heads/master
+ - refs/tags/**
status:
- - success
- - failure
+ - success
+ - failure
depends_on:
-- build
+ - build
---
kind: signature
-hmac: a48861856f45a5fea19c866058aa857abcdd77d604be1835d254407e7d7d0688
+hmac: ef12dc4cc2bd5bdd48ad22c1671fbc838e4e3e40163b3a3a3b8c893d19ea7e19
...
diff --git a/renovate.json b/renovate.json
new file mode 100644
index 0000000..5f02575
--- /dev/null
+++ b/renovate.json
@@ -0,0 +1,4 @@
+{
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
+ "extends": ["github>thegeeklab/renovate-presets:docker"]
+}