set up xbps publishing

This commit is contained in:
Luca Bilke 2023-11-23 18:48:53 +01:00
parent 533c36b512
commit 81e0bb75e4
1 changed files with 31 additions and 19 deletions

View File

@ -1,47 +1,59 @@
when:
event: tag
steps:
prep:
image: alpine
commands: |
wget http://repo-default.voidlinux.org/static/xbps-static-latest.x86_64-musl.tar.xz
build:
image: alpine
commands: |
apk add --no-cache build-base gcc xcb-util-dev pkgconfig >/dev/null
make install DESTDIR="$CI_WORKSPACE/pkg" PREFIX="/usr"
make install DESTDIR="$${CI_WORKSPACE}/pkg" PREFIX="/usr"
package-xbps:
image: alpine
environment:
- LICENSE="GPL-2.0"
- SHORT_DESCRIPTION="Customized dwmblocks-async"
commands: |
wget http://repo-default.voidlinux.org/static/xbps-static-latest.x86_64-musl.tar.xz
tar xvf xbps-static-latest.x86_64-musl.tar.xz -C /
xbps-create -A x86_64 \
-H "${CI_REPO_URL}" \
-l "{GPL-2.0}" \
-n "dwmblocks-async-${CI_COMMIT_TAG}" \
-m "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>" \
-s "Customized dwmblocks-async" \
-c "${CI_COMMIT_MESSAGE}" \
"$CI_WORKSPACE/pkg"
-H "$${CI_REPO_URL}" \
-l "$${LICENSE}" \
-n "$${CI_REPO_NAME}-$${CI_COMMIT_TAG}" \
-m "$${CI_COMMIT_AUTHOR} <$${CI_COMMIT_AUTHOR_EMAIL}>" \
-s "$${SHORT_DESCRIPTION}" \
-c "$${CI_COMMIT_MESSAGE}" \
"$${CI_WORKSPACE}/pkg"
package-targz:
image: alpine
commands: |
tar czf $${CI_REPO_NAME}.tar.gz --directory=$${CI_WORKSPACE}/pkg .
publish:
image: woodpeckerci/plugin-gitea-release
settings:
base_url: https://git.snaile.de
files:
# Could also be "hello-world*" to match both
- "pkg/usr/bin/dwmblocks"
- "*.xbps"
- "${CI_REPO_NAME}.tar.gz"
- "${CI_REPO_NAME}.xbps"
api_key:
from_secret: GITEA_RELEASE_KEY
target: main
publish-xbps:
image: alpine
secrets: XBPS_SIGNING_KEY
secrets:
- source: XBPS_SIGNING_KEYPHRASE
target: XBPS_PASSPHRASE
volumes:
- /srv/www:/srv/www
- /srv/www:/target
- /etc/woodpecker.pem:/etc/privatekey.pem:ro
commands: |
wget http://repo-default.voidlinux.org/static/xbps-static-latest.x86_64-musl.tar.xz
tar xvf xbps-static-latest.x86_64-musl.tar.xz -C /
echo "$XBPS_SIGNING_KEY" > privkey.pem
mv *.xbps /srv/www/
xbps-rindex -a /srv/www/*.xbps
xbps-rindex --sign --signedby "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>" --privkey privkey.pem /srv/www/
mv $${CI_REPO_NAME}.xbps /target
xbps-rindex -a /target/$${CI_REPO_NAME}.xbps
xbps-rindex --sign-pkg --signedby "$${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>" --privkey /etc/privkey.pem /target/$${CI_REPO_NAME}.xbps