chore: cut GitHub, make vrcx Gitea-only
- relink README/CHANGELOG/pyproject to git.engelgardt23.ru; drop github build badge - update-check + clone URL point to Gitea; rename GITHUB_REPO -> REPO - port CI to .gitea/workflows (self-contained, publishes Gitea release) - remove .github (workflow + issue templates)
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
# Self-contained: no external (GitHub-hosted) actions. Runs on a self-hosted
|
||||
# Windows runner (label `windows`) that already has Python 3.12 on PATH.
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows
|
||||
steps:
|
||||
- name: Checkout repository at tag
|
||||
shell: pwsh
|
||||
env:
|
||||
TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
$base = "${{ github.server_url }}" -replace '^https://', ''
|
||||
$url = "https://oauth2:$env:TOKEN@$base/${{ github.repository }}.git"
|
||||
git clone --depth 1 --branch "$env:GITHUB_REF_NAME" $url .
|
||||
|
||||
- name: Install build dependencies
|
||||
run: python -m pip install --upgrade pip pyinstaller rich paramiko
|
||||
|
||||
- name: Resolve version from tag
|
||||
id: ver
|
||||
shell: pwsh
|
||||
run: |
|
||||
$v = "$env:GITHUB_REF_NAME" -replace '^v', ''
|
||||
"version=$v" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
|
||||
|
||||
- name: Build executable
|
||||
run: python -m PyInstaller --onefile --console --name vrcx --icon dev/assets/icon.ico --paths dev/src dev/vrcx-launcher.py
|
||||
|
||||
- name: Package portable folder
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ver = '${{ steps.ver.outputs.version }}'
|
||||
$folder = "vrcx-v$ver"
|
||||
New-Item -ItemType Directory -Path $folder | Out-Null
|
||||
Copy-Item dist/vrcx.exe $folder/
|
||||
@"
|
||||
vrcx v$ver - portable edition
|
||||
|
||||
Vegman Remote Collect (extended) — diagnostic log collector for
|
||||
YADRO Vegman servers. Pulls logs from the BMC and, optionally, the
|
||||
SDS service OS in parallel.
|
||||
|
||||
USAGE
|
||||
Double-click vrcx.exe.
|
||||
Paste one or more BMC IPs (space/comma/newline separated; empty line to end).
|
||||
Enter BMC username (default admin) and password.
|
||||
Answer "Collect OS logs too? [y/N]" — if yes, enter SDS user/pass.
|
||||
Watch the live progress table.
|
||||
When done you get a single out\<DDMMYYYY_HHMMSS>\<stamp>.tar.gz
|
||||
ready to send to YADRO support.
|
||||
|
||||
OUTPUT
|
||||
out\<DDMMYYYY_HHMMSS>\
|
||||
<bmc_ip>\bmc\ (BMC logs)
|
||||
<bmc_ip>\os\ (SDS host logs, if enabled)
|
||||
archives\dump_<bmc_ip>.tar.gz
|
||||
<DDMMYYYY_HHMMSS>.tar.gz (one-click bundle for support)
|
||||
|
||||
NOTES
|
||||
- Nothing is installed. Delete the folder to remove.
|
||||
- BMC-only mode is 1:1 compatible with the original VRC tool.
|
||||
"@ | Out-File -FilePath "$folder/README.txt" -Encoding UTF8
|
||||
Compress-Archive -Path $folder -DestinationPath "vrcx-portable-v$ver.zip"
|
||||
|
||||
- name: Generate SHA-256 checksum
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ver = '${{ steps.ver.outputs.version }}'
|
||||
$zip = "vrcx-portable-v$ver.zip"
|
||||
$hash = (Get-FileHash -Algorithm SHA256 $zip).Hash.ToLower()
|
||||
"$hash $zip" | Out-File -FilePath "$zip.sha256" -Encoding ASCII -NoNewline
|
||||
Get-Content "$zip.sha256"
|
||||
|
||||
- name: Publish Gitea release
|
||||
shell: pwsh
|
||||
env:
|
||||
TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
$ver = '${{ steps.ver.outputs.version }}'
|
||||
$tag = "v$ver"
|
||||
$api = "${{ github.server_url }}/api/v1/repos/${{ github.repository }}"
|
||||
$hdr = @{ Authorization = "token $env:TOKEN" }
|
||||
$body = @{ tag_name = $tag; name = $tag; draft = $false; prerelease = $false } | ConvertTo-Json
|
||||
$rel = Invoke-RestMethod -Method Post -Uri "$api/releases" -Headers $hdr -ContentType 'application/json' -Body $body
|
||||
$rid = $rel.id
|
||||
foreach ($f in @("vrcx-portable-v$ver.zip", "vrcx-portable-v$ver.zip.sha256")) {
|
||||
curl.exe -s -H "Authorization: token $env:TOKEN" -F "attachment=@$f" "$api/releases/$rid/assets?name=$f" | Out-Null
|
||||
Write-Host "uploaded $f"
|
||||
}
|
||||
Reference in New Issue
Block a user