diff --git a/.gitea/workflows/build-nsInnoUnp.yml b/.gitea/workflows/build-ns7zip.yml similarity index 62% rename from .gitea/workflows/build-nsInnoUnp.yml rename to .gitea/workflows/build-ns7zip.yml index 3def4ec..55b67ac 100644 --- a/.gitea/workflows/build-nsInnoUnp.yml +++ b/.gitea/workflows/build-ns7zip.yml @@ -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) # 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 -name: Build (Local CI) +name: Build ns7zip (Local CI) on: push: @@ -25,17 +25,24 @@ jobs: runs-on: ${{ matrix.target }}-build 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: build-command: 'python build_plugin.py --final --dist-dir dist' artifact-source: 'dist' submodules: 'true' guest-os: ${{ matrix.target == 'linux' && 'Linux' || 'Windows' }} - # SSH URL alias configured in host ~/.ssh/config — same for both runners - repo-url: 'ssh://gitea-ci/Simone/nsis-plugin-nsinnounp.git' + # repo-url uses the host SSH alias `gitea-ci` (~/.ssh/config), + # 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 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 ──────────────────────────── # Runs only on tag pushes, after both matrix legs succeed. @@ -46,18 +53,10 @@ jobs: runs-on: windows-build steps: - - name: Download Windows artifact - uses: actions/download-artifact@v4 - with: - name: nsis-plugin-nsinnounp-windows-${{ github.ref_name }} - path: artifacts/windows - - - name: Download Linux artifact - uses: actions/download-artifact@v4 - with: - name: nsis-plugin-nsinnounp-linux-${{ github.ref_name }} - path: artifacts/linux - + # No actions/download-artifact (its code is fetched from github.com). + # The runner host is single and shared; the build matrix legs left + # their outputs at F:\CI\Artifacts\{run_id}-{run_attempt}-{target} + # (job-id-suffix = matrix.target). Read them directly from disk. - name: Create Gitea release and upload assets shell: powershell env: @@ -65,6 +64,8 @@ jobs: GITEA_URL: ${{ github.server_url }} REPO: ${{ github.repository }} TAG: ${{ github.ref_name }} + RUN_ID: ${{ github.run_id }} + RUN_ATTEMPT: ${{ github.run_attempt }} run: | #Requires -Version 5.1 Set-StrictMode -Version Latest @@ -86,10 +87,16 @@ jobs: $releaseId = $release.id 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')) { - $srcDir = "artifacts\$target" - $zipName = "nsis-plugin-nsinnounp-$target-$env:TAG.zip" + $srcDir = "F:\CI\Artifacts\$env:RUN_ID-$env:RUN_ATTEMPT-$target" + 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 $uploadUrl = "$apiBase/releases/$releaseId/assets?name=$zipName"