Add .deb packaging (Debian/Ubuntu) and PKGBUILD (Arch) to CI
Build AD Bulk Tool / build (ubuntu-latest, linux-arm64, ) (push) Failing after 3m15s
Build AD Bulk Tool / build (macos-latest, osx-arm64, ) (push) Canceled after 0s
Build AD Bulk Tool / build (macos-latest, osx-x64, ) (push) Canceled after 0s
Build AD Bulk Tool / build (ubuntu-latest, win-x64, .exe) (push) Canceled after 0s
Build AD Bulk Tool / packaging (push) Canceled after 0s
Build AD Bulk Tool / build (ubuntu-latest, linux-x64, ) (push) Canceled after 1m35s
Build AD Bulk Tool / build (ubuntu-latest, linux-arm64, ) (push) Failing after 3m15s
Build AD Bulk Tool / build (macos-latest, osx-arm64, ) (push) Canceled after 0s
Build AD Bulk Tool / build (macos-latest, osx-x64, ) (push) Canceled after 0s
Build AD Bulk Tool / build (ubuntu-latest, win-x64, .exe) (push) Canceled after 0s
Build AD Bulk Tool / packaging (push) Canceled after 0s
Build AD Bulk Tool / build (ubuntu-latest, linux-x64, ) (push) Canceled after 1m35s
This commit is contained in:
@@ -9,7 +9,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rid: [win-x64, linux-x64, osx-x64, osx-arm64]
|
rid: [win-x64, linux-x64, linux-arm64, osx-x64, osx-arm64]
|
||||||
include:
|
include:
|
||||||
- rid: win-x64
|
- rid: win-x64
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
@@ -17,6 +17,9 @@ jobs:
|
|||||||
- rid: linux-x64
|
- rid: linux-x64
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
suffix: ''
|
suffix: ''
|
||||||
|
- rid: linux-arm64
|
||||||
|
os: ubuntu-latest
|
||||||
|
suffix: ''
|
||||||
- rid: osx-x64
|
- rid: osx-x64
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
suffix: ''
|
suffix: ''
|
||||||
@@ -38,8 +41,49 @@ jobs:
|
|||||||
- name: Publish (${{ matrix.rid }})
|
- name: Publish (${{ matrix.rid }})
|
||||||
run: dotnet publish ADBulkTool.csproj -c Release -r ${{ matrix.rid }} --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o publish/${{ matrix.rid }}
|
run: dotnet publish ADBulkTool.csproj -c Release -r ${{ matrix.rid }} --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o publish/${{ matrix.rid }}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Build .deb (linux-x64 only)
|
||||||
|
if: matrix.rid == 'linux-x64'
|
||||||
|
run: |
|
||||||
|
chmod +x packaging/build-deb.sh
|
||||||
|
packaging/build-deb.sh publish/linux-x64/ADBulkTool "${GITHUB_REF_NAME:-1.0.0}"
|
||||||
|
|
||||||
|
- name: Upload binary
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ADBulkTool-${{ matrix.rid }}
|
name: ADBulkTool-${{ matrix.rid }}
|
||||||
path: publish/${{ matrix.rid }}/ADBulkTool${{ matrix.suffix }}
|
path: publish/${{ matrix.rid }}/ADBulkTool${{ matrix.suffix }}
|
||||||
|
|
||||||
|
packaging:
|
||||||
|
needs: [build]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Download all binaries
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
# Build .deb from the linux-x64 binary
|
||||||
|
mkdir -p deb_root/DEBIAN deb_root/usr/bin
|
||||||
|
cp ADBulkTool-linux-x64/ADBulkTool deb_root/usr/bin/adbulktool
|
||||||
|
chmod 755 deb_root/usr/bin/adbulktool
|
||||||
|
VERSION="${GITHUB_REF_NAME#v}"
|
||||||
|
sed "s/Version: 1.0.0/Version: $VERSION/" packaging/debian/DEBIAN/control > deb_root/DEBIAN/control
|
||||||
|
dpkg-deb --root-owner-group --build deb_root "ADBulkTool-linux-x64/adbulktool_${VERSION}_amd64.deb"
|
||||||
|
|
||||||
|
# Copy PKGBUILD for Arch
|
||||||
|
cp packaging/arch/PKGBUILD packaging/arch/.INSTALL ADBulkTool-linux-x64/
|
||||||
|
|
||||||
|
# Upload all as release assets
|
||||||
|
for dir in ADBulkTool-*/; do
|
||||||
|
for file in "$dir"*; do
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
echo "Uploading: $file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
post_install() {
|
||||||
|
echo "AD Bulk Tool installed. Run 'adbulktool' to start."
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
echo "AD Bulk Tool updated."
|
||||||
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
echo "AD Bulk Tool removed."
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Maintainer: mikisoq
|
||||||
|
pkgname=adbulktool
|
||||||
|
pkgver=1.0.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Bulk Active Directory tool - cross-platform GUI app for AD operations from CSV"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://gitea.mikisoq.cc/mikisoq/ADBulk"
|
||||||
|
license=('MIT')
|
||||||
|
depends=()
|
||||||
|
source=("$url/releases/download/v$pkgver/ADBulkTool-linux-x64")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
install=.INSTALL
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm755 "$srcdir/ADBulkTool-linux-x64" "$pkgdir/usr/bin/adbulktool"
|
||||||
|
}
|
||||||
Executable
+16
@@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
BINARY="$1"
|
||||||
|
VERSION="${2:-1.0.0}"
|
||||||
|
OUTDIR="${3:-dist}"
|
||||||
|
|
||||||
|
mkdir -p "$OUTDIR/DEBIAN" "$OUTDIR/usr/bin"
|
||||||
|
|
||||||
|
cp "$BINARY" "$OUTDIR/usr/bin/adbulktool"
|
||||||
|
chmod 755 "$OUTDIR/usr/bin/adbulktool"
|
||||||
|
|
||||||
|
sed "s/Version: 1.0.0/Version: $VERSION/" packaging/debian/DEBIAN/control > "$OUTDIR/DEBIAN/control"
|
||||||
|
|
||||||
|
dpkg-deb --root-owner-group --build "$OUTDIR" "publish/adbulktool_${VERSION}_amd64.deb"
|
||||||
|
rm -rf "$OUTDIR"
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
Package: adbulktool
|
||||||
|
Version: 1.0.0
|
||||||
|
Section: utils
|
||||||
|
Priority: optional
|
||||||
|
Architecture: amd64
|
||||||
|
Maintainer: mikisoq
|
||||||
|
Description: Bulk Active Directory tool
|
||||||
|
Cross-platform GUI app for bulk AD operations from a CSV file.
|
||||||
|
Supports user enable/disable, group add/remove, password reset.
|
||||||
Reference in New Issue
Block a user