Compare commits
17
Commits
1fbcf4fcdd
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e3e7b79c2 | ||
|
|
b4d6a6547f | ||
|
|
7f741f39b4 | ||
|
|
3da5f52a29 | ||
|
|
cc2ddf47ea | ||
|
|
2415f4d15c | ||
|
|
3cb868e25f | ||
|
|
94d6434e79 | ||
|
|
dde683120a | ||
|
|
fabe23767e | ||
|
|
497532ee48 | ||
|
|
c92544ebfe | ||
|
|
e1f45bc60b | ||
|
|
b6a57a104e | ||
|
|
3987e453c2 | ||
|
|
ff3703bae5 | ||
|
|
e65474beaf |
@@ -3,28 +3,29 @@ name: Build AD Bulk Tool
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, feature/**, bugfix/**]
|
branches: [main, feature/**, bugfix/**]
|
||||||
|
tags: [v*]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: ${{ matrix.name }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rid: [win-x64, linux-x64, osx-x64, osx-arm64]
|
|
||||||
include:
|
include:
|
||||||
- rid: win-x64
|
- rid: win-x64
|
||||||
os: ubuntu-latest
|
name: Windows x64
|
||||||
suffix: .exe
|
suffix: .exe
|
||||||
- rid: linux-x64
|
- rid: linux-x64
|
||||||
os: ubuntu-latest
|
name: Linux x64
|
||||||
suffix: ''
|
suffix: ''
|
||||||
- rid: osx-x64
|
- rid: osx-x64
|
||||||
os: macos-latest
|
name: macOS x64
|
||||||
suffix: ''
|
suffix: ''
|
||||||
- rid: osx-arm64
|
- rid: osx-arm64
|
||||||
os: macos-latest
|
name: macOS ARM64
|
||||||
suffix: ''
|
suffix: ''
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -38,8 +39,66 @@ 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: Build .deb (linux-x64 only)
|
||||||
|
if: matrix.rid == 'linux-x64' && startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: |
|
||||||
|
VERSION="${GITHUB_REF_NAME#v}"
|
||||||
|
chmod +x packaging/build-deb.sh
|
||||||
|
packaging/build-deb.sh publish/linux-x64/ADBulkTool "$VERSION"
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
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 }}
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
release:
|
||||||
|
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 artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
|
||||||
|
- name: Upload release assets
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
VERSION="${GITHUB_REF_NAME}"
|
||||||
|
API="http://192.168.1.4:30008/api/v1/repos/mikisoq/ADBulk/releases"
|
||||||
|
|
||||||
|
# Get the release ID for this tag
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
"$API/tags/$VERSION" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
||||||
|
|
||||||
|
upload() {
|
||||||
|
local file="$1"
|
||||||
|
local name="$2"
|
||||||
|
echo "Uploading $name..."
|
||||||
|
curl -s -X POST -H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-F "attachment=@$file" \
|
||||||
|
"$API/$RELEASE_ID/assets?name=$name"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build .deb and upload everything
|
||||||
|
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
|
||||||
|
VERS="${VERSION#v}"
|
||||||
|
sed "s/Version: 1.0.0/Version: $VERS/" packaging/debian/DEBIAN/control > deb_root/DEBIAN/control
|
||||||
|
dpkg-deb --root-owner-group --build deb_root "adbulktool_${VERS}_amd64.deb"
|
||||||
|
|
||||||
|
upload "ADBulkTool-linux-x64/ADBulkTool" "ADBulkTool-linux-x64"
|
||||||
|
upload "ADBulkTool-win-x64/ADBulkTool.exe" "ADBulkTool-win-x64.exe"
|
||||||
|
upload "ADBulkTool-osx-x64/ADBulkTool" "ADBulkTool-macos-x64"
|
||||||
|
upload "ADBulkTool-osx-arm64/ADBulkTool" "ADBulkTool-macos-arm64"
|
||||||
|
upload "adbulktool_${VERS}_amd64.deb" "adbulktool_${VERS}_amd64.deb"
|
||||||
|
cp packaging/arch/PKGBUILD packaging/arch/.INSTALL .
|
||||||
|
upload "PKGBUILD" "PKGBUILD"
|
||||||
|
upload ".INSTALL" ".INSTALL"
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ Failed.csv
|
|||||||
*.cer
|
*.cer
|
||||||
*.crt
|
*.crt
|
||||||
|
|
||||||
|
# Local build output
|
||||||
|
publish/
|
||||||
|
dist/
|
||||||
|
|
||||||
# OS junk
|
# OS junk
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|||||||
@@ -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