Compare commits

..

33 commits

Author SHA1 Message Date
Benjamin Renard
c815019f13
Release 9.0.2 2024-11-16 13:02:40 +01:00
7fef17b94c Release 9.0.1 2024-10-29 14:19:59 +01:00
Benjamin Renard
df27bd4632
publish_new_release.sh: show current latest published release and provide the link to follow build process 2024-10-17 14:26:52 +02:00
Benjamin Renard
6d925d86e4
Release 9.0.0 2024-10-17 14:21:48 +02:00
bn8
3e8a967e07 Release 8.0.3 2024-09-07 08:55:30 +02:00
Benjamin Renard
cfdb452239
Release 8.0.2 2024-08-30 08:54:06 +02:00
Benjamin Renard
a849e5c472
publish_new_release.sh: add git pull 2024-08-30 08:53:58 +02:00
e36c833efa Release 8.0.1 2024-08-10 13:50:28 +02:00
Benjamin Renard
d7f9fc5d75
Release 8.0.0 2024-07-31 09:39:14 +02:00
Benjamin Renard
b40012b6d4
Release 7.0.5 2024-07-04 19:45:28 +02:00
Benjamin Renard
5387fc35d7
Release 7.0.4 2024-06-14 23:47:23 +02:00
Benjamin Renard
d3f1c1b28d
Release 7.0.3 2024-05-23 16:04:55 +02:00
Benjamin Renard
4f890f6899
publish_new_release.sh: fix checking/installing dependencies 2024-05-03 15:40:05 +02:00
Benjamin Renard
23adeb0ee2
Release 7.0.2 2024-05-03 15:38:00 +02:00
74b8c05e52 Release 7.0.1 2024-04-28 12:55:40 +02:00
7abcd92973 Release 7.0.0 2024-04-24 21:40:32 +02:00
e18b4e2472 Release 1.21.11-1 2024-04-19 18:14:24 +02:00
Benjamin Renard
3029d6f85b
Release 1.21.10-0 2024-04-05 09:44:09 +02:00
df8356b471 CI: Add dependencies between jobs 2024-03-24 08:38:08 +01:00
dfbf811d1c Release 1.21.8-0 2024-03-24 08:28:07 +01:00
420b2f4f01 publish_new_release.sh: use debian packaged xq tool 2024-03-10 19:15:11 +01:00
c620a491ce Switch from Woodpecker CI to Forgejo Actions 2024-03-10 19:15:11 +01:00
Benjamin Renard
bf82a6cddc
Release 1.21.7-0
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-03-07 10:20:58 +01:00
efd539a810 Release 1.21.6-0
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-02-23 09:49:06 +01:00
Benjamin Renard
54ac81fb98
Add publish_new_release.sh script
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-02-01 10:03:42 +01:00
Benjamin Renard
f53167cb7b
Release 1.21.5-0
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-02-01 10:02:31 +01:00
Benjamin Renard
0543119173
Release 1.21.4-0
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-01-18 09:38:20 +01:00
6818e5bf52 Release 1.21.3-0
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-12-23 21:50:19 +01:00
Benjamin Renard
4e3ebb132f
Release 1.21.2-1
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-12-13 19:49:21 +01:00
Benjamin Renard
88b5568072
Release 1.21.2-0
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-12-11 09:34:47 +01:00
a39ceecb04 Release 1.21.1-0
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-11-26 18:13:54 +01:00
89d2b8a221 Release 1.20.5-1
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-11-26 17:50:51 +01:00
Benjamin Renard
2f4f3e731f
Release 1.20.5-0
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-10-23 14:57:03 +02:00
5 changed files with 189 additions and 56 deletions

View file

@ -0,0 +1,85 @@
---
name: Build and publish Debian package
on: [create]
jobs:
build:
runs-on: docker
container:
image: docker.io/brenard/debian-python-deb:latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Debian package
env:
MAINTAINER_NAME: ${{ vars.MAINTAINER_NAME }}
MAINTAINER_EMAIL: ${{ vars.MAINTAINER_EMAIL }}
DEBIAN_CODENAME: ${{ vars.DEBIAN_CODENAME }}
run: |
echo "${{ secrets.GPG_KEY }}"|base64 -d|gpg --import
./build.sh
- name: Upload Debian package files
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist/*.buildinfo
dist/*.changes
dist/*.deb
dist/*.dsc
dist/*.tar.gz
dist/release_notes.md
publish-forgejo:
runs-on: docker
container:
image: docker.io/brenard/debian-python-deb:latest
needs: build
steps:
- name: Download Debian package files
uses: actions/download-artifact@v3
with:
name: dist
- name: Create the release
id: create-release
shell: bash
run: |
mkdir release
mv *.deb release/
{
echo 'release_note<<EOF'
cat release_notes.md
echo 'EOF'
} >> "$GITHUB_OUTPUT"
- name: Publish release on Forgejo
uses: actions/forgejo-release@v1
with:
direction: upload
url: https://gitea.zionetrix.net
token: ${{ secrets.forgejo_token }}
release-dir: release
release-notes: ${{ steps.create-release.outputs.release_note }}
publish-aptly:
runs-on: docker
container:
image: docker.io/brenard/aptly-publish:latest
needs: build
steps:
- name: "Download Debian package files"
uses: actions/download-artifact@v3
with:
name: dist
- name: "Publish Debian package on Aptly repository"
uses: https://gitea.zionetrix.net/bn8/aptly-publish@master
with:
api_url: ${{ vars.apt_api_url }}
api_username: ${{ vars.apt_api_username }}
api_password: ${{ secrets.apt_api_password }}
repo_name: ${{ vars.apt_repo_name }}
path: "./"
source_name: ${{ vars.apt_source_name }}

View file

@ -1,55 +0,0 @@
clone:
git:
image: woodpeckerci/plugin-git
tags: true
pipeline:
build:
image: brenard/debian-python-deb
when:
event: tag
commands:
- echo "$GPG_KEY"|base64 -d|gpg --import
- ./build.sh --quiet
secrets: [ maintainer_name, maintainer_email, gpg_key, debian_codename ]
publish-dryrun:
group: publish
image: alpine
when:
event: tag
commands:
- ls dist/*
publish-gitea:
group: publish
image: plugins/gitea-release
when:
event: tag
settings:
api_key:
from_secret: gitea_token
base_url: https://gitea.zionetrix.net
note: dist/release_notes.md
files:
- dist/*.deb
checksum:
- md5
- sha512
publish-apt:
group: publish
image: brenard/aptly-publish
when:
event: tag
settings:
api_url:
from_secret: apt_api_url
api_username:
from_secret: apt_api_username
api_password:
from_secret: apt_api_password
repo_name:
from_secret: apt_repo_name
path: dist
source_name: forgejo

View file

@ -1,11 +1,51 @@
#!/bin/bash #!/bin/bash
DEBUG=0
INSTALL_DEPS=0
QUIET_ARG="" QUIET_ARG=""
[ "$1" == "--quiet" ] && QUIET_ARG="--quiet"
function usage() {
[ -n "$@" ] && echo -e "$@\n" > /dev/stderr
echo "Usage: $0 [-x] [-I]"
echo " -I/--install-deps Install build dependencies"
echo " -q/--quiet Enable quiet mode"
echo " -x/--debug Enable debug mode"
[ -n "$@" ] && exit 1
}
idx=1
while [ $idx -le $# ]
do
OPT=${!idx}
case $OPT in
-I|--install-deps)
INSTALL_DEPS=1
;;
-q|--quiet)
QUIET_ARG="--quiet"
;;
-x|--debug)
set -x
DEBUG=1
;;
*)
usage "Unkown parameter '$OPT'"
esac
let idx=idx+1
done
# Enter source directory # Enter source directory
cd $( dirname $0 ) cd $( dirname $0 )
# Install build dependencies
if [ $INSTALL_DEPS -eq 1 ]
then
echo "Install build dependencies..."
apt-get update
apt-get install --no-install-recommends --yes \
$(grep Build-Depends debian/control|sed 's/Build-Depends: //'|sed 's/([^)]\+)//'|tr -d ',')
fi
echo "Clean previous build..." echo "Clean previous build..."
rm -fr dist rm -fr dist

1
last_release.txt Normal file
View file

@ -0,0 +1 @@
9.0.2

62
publish_new_release.sh Executable file
View file

@ -0,0 +1,62 @@
#!/bin/bash
ROOT_DIR=$( dirname $( realpath $0 ) )
set -e
echo "Checking dependencies..."
MISSING_PACKAGES=()
for bin in /usr/bin/curl /usr/bin/xq /usr/bin/sed /usr/bin/git
do
echo -n "- $bin: "
if [ -x "$bin" ]
then
echo "OK"
else
echo "Missing"
MISSING_PACKAGES+=( $(basename $bin) )
fi
done
if [ ${#MISSING_PACKAGES[@]} -gt 0 ]
then
echo "Install missing packages (${MISSING_PACKAGES[@]})..."
apt install -y ${#MISSING_PACKAGES[@]}
fi
cd $ROOT_DIR
echo "Update git repo:"
git pull
echo "done."
echo "Latest published release: $( /usr/bin/git tag | tail -n 1 )"
LATEST="$1"
if [ -z "$LATEST" ]
then
echo -n "Getting latest release..."
LATEST=$( /usr/bin/curl --silent https://forgejo.org/releases/rss.xml|/usr/bin/xq -x '/rss/channel/item[1]/title'|/usr/bin/sed 's/^v//' )
echo done.
fi
echo "Latest upstream release: $LATEST"
[ -n "$( /usr/bin/git tag -l "$LATEST" )" ] && echo "Release $LATEST already exists" && exit 1
echo "Press [enter] to create and publish this new release $LATEST"
read
echo "Create new release..."
echo -n "$LATEST" > last_release.txt
/usr/bin/git add last_release.txt
/usr/bin/git commit -m "Release $LATEST"
/usr/bin/git tag "$LATEST"
echo done.
echo "Publish new release..."
/usr/bin/git push
/usr/bin/git push --tags
echo done.
echo "Not release $LATEST published. Follow build process there:"
echo "https://gitea.zionetrix.net/bn8/forgejo_debian_packager/actions"