9 Commits

Author SHA1 Message Date
c15f995566 try perl image 2025-12-09 21:25:24 +01:00
6ff6043dd5 back 2025-12-09 21:03:32 +01:00
7afdb41b71 more fixes 2025-12-09 20:59:52 +01:00
bfc7b838f5 fix test 2025-12-09 20:52:20 +01:00
0a480f2632 add make 2025-12-09 20:51:10 +01:00
f7c91dff2b +y 2025-12-09 20:49:06 +01:00
fe00738811 +makemaker 2025-12-09 20:47:53 +01:00
abad53b84e +woodpecker 2025-12-09 20:44:10 +01:00
1c27e5e8ef moving to codeberg 2025-12-09 20:34:11 +01:00
2 changed files with 0 additions and 77 deletions

View File

@@ -1,54 +0,0 @@
#!/bin/bash
# This is my own simple codeberg generic releaser. It takes to
# binaries to be uploaded as arguments and takes every other args from
# env. Works on tags or normal commits (push), tags must start with v.
set -e
die() {
echo $*
exit 1
}
if test -z "$DEPLOY_TOKEN"; then
die "token DEPLOY_TOKEN not set"
fi
git fetch --all
# determine current tag or commit hash
version="$CI_COMMIT_TAG"
previous=""
log=""
if test -z "$version"; then
version="${CI_COMMIT_SHA:0:6}"
log=$(git log -1 --oneline)
else
previous=$(git tag -l | grep -E "^v" | tac | grep -A1 "$version" | tail -1)
log=$(git log -1 --oneline "${previous}..${version}" | sed 's|^|- |g')
fi
# release body
printf "# Changes\n\n %s\n" "$log" > body.txt
# create the release
https --ignore-stdin --check-status -b -A bearer -a "$DEPLOY_TOKEN" POST \
"https://codeberg.org/api/v1/repos/${CI_REPO_OWNER}/${CI_REPO_NAME}/releases" \
tag_name="$version" name="Release $version" body=@body.txt > release.json
# we need the id to upload files
ID=$(jq -r .id < release.json)
if test -z "$ID"; then
cat release.json
die "failed to create release"
fi
# actually upload
for file in "$@"; do
https --ignore-stdin --check-status -A bearer -a "$DEPLOY_TOKEN" -f POST \
"https://codeberg.org/api/v1/repos/${CI_REPO_OWNER}/${CI_REPO_NAME}/releases/$ID/assets" \
"name=${file}" "attachment@${file}"
done

View File

@@ -1,23 +0,0 @@
# build release
steps:
compile:
when:
event: [tag]
image: perl:5.43.5-slim-bookworm
commands:
- perl Makefile.PL
- make
- make dist
release:
image: alpine:latest
when:
event: [tag]
environment:
DEPLOY_TOKEN:
from_secret: DEPLOY_TOKEN
commands:
- apk update
- apk add --no-cache bash httpie jq git
- .woodpecker/release.sh Config-General-$CI_COMMIT_TAG.tar.gz