Compare commits
10
Commits
v1.0.1
..
1fbcf4fcdd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1fbcf4fcdd | ||
|
|
67599fb1e5 | ||
|
|
7f950d05ed | ||
|
|
31d1526ffe | ||
|
|
bb32a78e1e | ||
|
|
fbbb708bfd | ||
|
|
b953b3f84a | ||
|
|
e6c67ec2b1 | ||
|
|
d10a4f47f5 | ||
|
|
acc2fe0a8a |
@@ -7,24 +7,24 @@ on:
|
|||||||
|
|
||||||
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
|
||||||
name: Windows x64
|
os: ubuntu-latest
|
||||||
suffix: .exe
|
suffix: .exe
|
||||||
- rid: linux-x64
|
- rid: linux-x64
|
||||||
name: Linux x64
|
os: ubuntu-latest
|
||||||
suffix: ''
|
suffix: ''
|
||||||
- rid: osx-x64
|
- rid: osx-x64
|
||||||
name: macOS x64
|
os: macos-latest
|
||||||
suffix: ''
|
suffix: ''
|
||||||
- rid: osx-arm64
|
- rid: osx-arm64
|
||||||
name: macOS ARM64
|
os: macos-latest
|
||||||
suffix: ''
|
suffix: ''
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -38,66 +38,8 @@ 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,10 +29,6 @@ Failed.csv
|
|||||||
*.cer
|
*.cer
|
||||||
*.crt
|
*.crt
|
||||||
|
|
||||||
# Local build output
|
|
||||||
publish/
|
|
||||||
dist/
|
|
||||||
|
|
||||||
# OS junk
|
# OS junk
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
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."
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# 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"
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/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"
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
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