ci: rename build workflow to build-ns7zip.yml on main

Propagates the renamed cross-repo build workflow (targets
nsis-plugin-ns7zip) to main.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Simone
2026-05-17 20:12:26 +02:00
parent 02ea7e61ec
commit 383490b769
@@ -1,12 +1,12 @@
# Build (Local CI) — pipeline per nsis-plugin-nsinnounp # Build ns7zip (Local CI) — pipeline per nsis-plugin-ns7zip
# #
# Cross-platform matrix build: runs in parallel on both windows-build (WinRM) # Cross-platform matrix build: runs in parallel on both windows-build (WinRM)
# and linux-build (SSH) runners using the reusable composite action. # and linux-build (SSH) runners using the reusable composite action.
# Uses: Simone/local-ci-system/.gitea/actions/local-ci-build@main # Uses: https://gitea.emulab.it/Simone/local-ci-cd-system/.gitea/actions/local-ci-build@main
# #
# Trigger: push su tag v*, oppure run manuale # Trigger: push su tag v*, oppure run manuale
name: Build (Local CI) name: Build ns7zip (Local CI)
on: on:
push: push:
@@ -25,17 +25,24 @@ jobs:
runs-on: ${{ matrix.target }}-build runs-on: ${{ matrix.target }}-build
steps: steps:
- uses: Simone/local-ci-system/.gitea/actions/local-ci-build@main - uses: https://gitea.emulab.it/Simone/local-ci-cd-system/.gitea/actions/local-ci-build@main
with: with:
build-command: 'python build_plugin.py --final --dist-dir dist' build-command: 'python build_plugin.py --final --dist-dir dist'
artifact-source: 'dist' artifact-source: 'dist'
submodules: 'true' submodules: 'true'
guest-os: ${{ matrix.target == 'linux' && 'Linux' || 'Windows' }} guest-os: ${{ matrix.target == 'linux' && 'Linux' || 'Windows' }}
# SSH URL alias configured in host ~/.ssh/config — same for both runners # repo-url uses the host SSH alias `gitea-ci` (~/.ssh/config),
repo-url: 'ssh://gitea-ci/Simone/nsis-plugin-nsinnounp.git' # which exists only on the host — so the clone MUST run on the
# host, not in the guest. use-git-clone:'false' selects the
# host-side clone + zip transfer transport.
use-git-clone: 'false'
repo-url: 'ssh://gitea-ci/Simone/nsis-plugin-ns7zip.git'
# Cross-repo build: github.ref_name is this repo's branch, not
# nsis-plugin-ns7zip's. Pin the target repo's branch.
repo-branch: 'main'
# Suffix disambiguates artifact dirs: F:\CI\Artifacts\{run_id}-{attempt}-windows # Suffix disambiguates artifact dirs: F:\CI\Artifacts\{run_id}-{attempt}-windows
job-id-suffix: '${{ matrix.target }}' job-id-suffix: '${{ matrix.target }}'
artifact-name: 'nsis-plugin-nsinnounp-${{ matrix.target }}-${{ github.ref_name }}' artifact-name: 'nsis-plugin-ns7zip-${{ matrix.target }}-${{ github.ref_name }}'
# ── Publish Gitea release with build artifacts ──────────────────────────── # ── Publish Gitea release with build artifacts ────────────────────────────
# Runs only on tag pushes, after both matrix legs succeed. # Runs only on tag pushes, after both matrix legs succeed.
@@ -46,18 +53,10 @@ jobs:
runs-on: windows-build runs-on: windows-build
steps: steps:
- name: Download Windows artifact # No actions/download-artifact (its code is fetched from github.com).
uses: actions/download-artifact@v4 # The runner host is single and shared; the build matrix legs left
with: # their outputs at F:\CI\Artifacts\{run_id}-{run_attempt}-{target}
name: nsis-plugin-nsinnounp-windows-${{ github.ref_name }} # (job-id-suffix = matrix.target). Read them directly from disk.
path: artifacts/windows
- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: nsis-plugin-nsinnounp-linux-${{ github.ref_name }}
path: artifacts/linux
- name: Create Gitea release and upload assets - name: Create Gitea release and upload assets
shell: powershell shell: powershell
env: env:
@@ -65,6 +64,8 @@ jobs:
GITEA_URL: ${{ github.server_url }} GITEA_URL: ${{ github.server_url }}
REPO: ${{ github.repository }} REPO: ${{ github.repository }}
TAG: ${{ github.ref_name }} TAG: ${{ github.ref_name }}
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
run: | run: |
#Requires -Version 5.1 #Requires -Version 5.1
Set-StrictMode -Version Latest Set-StrictMode -Version Latest
@@ -86,10 +87,16 @@ jobs:
$releaseId = $release.id $releaseId = $release.id
Write-Host "Release created: id=$releaseId name=$($release.name)" Write-Host "Release created: id=$releaseId name=$($release.name)"
# Compress each artifact directory and upload as a release asset # Compress each host-side artifact directory and upload as a
# release asset. The build legs collected to
# F:\CI\Artifacts\{run_id}-{run_attempt}-{target}.
foreach ($target in @('windows', 'linux')) { foreach ($target in @('windows', 'linux')) {
$srcDir = "artifacts\$target" $srcDir = "F:\CI\Artifacts\$env:RUN_ID-$env:RUN_ATTEMPT-$target"
$zipName = "nsis-plugin-nsinnounp-$target-$env:TAG.zip" if (-not (Test-Path -LiteralPath $srcDir) -or
-not (Get-ChildItem -Force -LiteralPath $srcDir)) {
throw "artifact dir missing or empty: $srcDir"
}
$zipName = "nsis-plugin-ns7zip-$target-$env:TAG.zip"
Compress-Archive -Path "$srcDir\*" -DestinationPath $zipName -Force Compress-Archive -Path "$srcDir\*" -DestinationPath $zipName -Force
$uploadUrl = "$apiBase/releases/$releaseId/assets?name=$zipName" $uploadUrl = "$apiBase/releases/$releaseId/assets?name=$zipName"