add ci
add debian package
This commit is contained in:
parent
1c0168fb59
commit
71bb23e37f
4 changed files with 66 additions and 0 deletions
6
.fpm
Normal file
6
.fpm
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
-s dir
|
||||
--name wireguard-gui
|
||||
--license agpl3
|
||||
--description "Wireguard GUI is a graphic tool that helps you to edit existing confs of Wireguard."
|
||||
--url "https://gitnet.fr/deblan/wireguard-gui"
|
||||
--maintainer "Simon Vieille <contact+wireguardgui@deblan.fr>"
|
||||
42
.woodpecker/build.yml
Normal file
42
.woodpecker/build.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
when:
|
||||
- event: [pull_request, tag]
|
||||
- event: push
|
||||
branch:
|
||||
- ${CI_REPO_DEFAULT_BRANCH}
|
||||
- develop
|
||||
- feature/*
|
||||
- release/*
|
||||
- renovate/*
|
||||
|
||||
variables:
|
||||
- &golang_image 'golang:1.22'
|
||||
|
||||
steps:
|
||||
"Add vendor":
|
||||
image: *golang_image
|
||||
commands:
|
||||
- go mod vendor
|
||||
|
||||
"Run build":
|
||||
image: *golang_image
|
||||
commands:
|
||||
- make
|
||||
|
||||
"Create packages":
|
||||
image: deblan/fpm-packager
|
||||
commands:
|
||||
- VERSION=${CI_COMMIT_TAG/v//}
|
||||
- ./bin/build-debs.sh "$VERSION"
|
||||
- ./bin/rename-builds.sh "$VERSION"
|
||||
when:
|
||||
event: [tag]
|
||||
|
||||
"Publish":
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitnet_api_key
|
||||
base_url: https://gitnet.fr
|
||||
files: ./build/*
|
||||
when:
|
||||
event: [tag]
|
||||
9
bin/build-debs.sh
Executable file
9
bin/build-debs.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
VERSION="$1"
|
||||
|
||||
for ARCH in amd64 arm64; do
|
||||
fpm -t deb -p "build/wireguard-gui-$VERSION-$ARCH.deb" \
|
||||
--architecture $ARCH --version "$VERSION" \
|
||||
"build/wireguard-gui-linux-$ARCH"=/usr/bin/wireguard-gui
|
||||
done
|
||||
9
bin/rename-builds.sh
Executable file
9
bin/rename-builds.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
VERSION="$1"
|
||||
|
||||
for ARCH in amd64 arm64; do
|
||||
mv -v \
|
||||
"build/wireguard-gui-linux-${ARCH}" \
|
||||
"build/wireguard-gui-${VERSION}-linux-${ARCH}"
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue